Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialiclick
10,945 PointsI can't find the error for getCategoryCounts
Error
./com/example/BlogPost.java:9: error: class Blog is public, should be declared in a file named Blog.java public class Blog { ^ ./com/example/Blog.java:11: error: cannot access BlogPost List mPosts; ^ bad source file: ./com/example/BlogPost.java file does not contain class com.example.BlogPost Please remove or make sure it appears in the correct subdirectory of the sourcepath. 2 errors
1 Answer
Seth Kroger
56,413 PointsIt looks like you edited the BlogPost class instead of Blog. Granted, the challenge does put the wrong file up first. You'll need to restart the challenge and click on the second tab to edit the class it's asking you to.