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 trialWill Bayley
500 PointsJava Objects Challenge 1 of 2
The question asked me to add a public method etc.
This is my code, which produces a compiler error.
Please help!
public class GoKart { private String mColor = "red";
public String getColour() { return mColour; } }
public class GoKart {
private String mColor = "red";
public String getColour() {
return mColour;
}
}
1 Answer
John Wheal
27,969 PointsYou have a typo. You are using the British spelling of Colour and also the American.
Will Bayley
500 PointsWill Bayley
500 PointsJohn, thank you. As always with these things, it's so obvious when it's pointed out. I couldn't see the wood for the trees!