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
Klaudia Krol
576 PointsPricacy and Methods task
Hi Java helpers ,
Could you please check what wrong is in my code?
https://teamtreehouse.com/library/java-objects/meet-objects/privacy-and-methods-2
Thx mil
Placinta Alexandru
3,011 Pointspublic class GoKart { public String mColor = "red";
public String getColor() { return mColor; } }
Klaudia Krol
576 PointsNo need help .. I passed my test thanks
1 Answer
Tomas Schlepers
18,039 PointsThe code you provided:
public class GoKart {
public String mColor = "red";
public String getColor() {
return mColor;
}
}
Is accepted on my computer. How about a restart of your browser or computer ? Perhaps that sounds lame but with me, that sometimes helps :)
Tomas Schlepers
18,039 PointsTomas Schlepers
18,039 PointsI can only see the following code:
Could you paste your own code ?