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 trialFrankie Lamar
11,120 PointsAndroid Build a Weather App Stage 4 Working with JSON Challenge Task 3 of 3 no errors, but still can't pass
The directions tell me to create getters and setters for the vars I created in the previous task. I did this as shown, I'm getting no error, but I still can't pass. Am I missing something or is there a bug in this Challenge
public class Movie{
private String mTitle;
private int mYearReleased;
public String getTitle(){
return mTitle;
}
public void setIcon(String title){
mTitle = title;
}
public int getYearReleased(){
return mYearReleased;
}
public void setYearReleased(int year){
mYearReleased = year;
}
}
2 Answers
Gloria Dwomoh
13,116 PointsThe challenge is functioning is its supposed to. The problem is here:
public void setIcon(String title){
mTitle = title;
}
"setIcon" does not exist here. I assume you mean "setTitle".
Frankie Lamar
11,120 PointsGood eye. Thanks!