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 trial
Tracey Hemphill-Wright
1,537 PointsError in Blog Post Reader
I'm stuck on the task: Add a new String member variable to the DummyItem class named ‘director’.I get a compliation error, but I don't see what is wrong. Compilation Error! The 'director' member variable should be a public String variable inside the DummyItem class, like 'id' and 'content'. Is there a section that has the correct answer so I can compare? Thanks!
2 Answers
Hubert Maraszek
4,084 Pointspublic static class DummyItem {
public String id;
public String content;
Just make a third declaration like those two right below, except with the variable being called 'director'.
Tracey Hemphill-Wright
1,537 PointsI found my mistake! DO ONLY WHAT IS INSTRUCTED, NOTHING MORE
public static class DummyItem { public String id; public String content; public String director;
.....But then I added to the constructor too. I guess I did more than asked, which gave me the error. Thanks for the feedback Hubert!