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

Java Java Objects Meet Objects Create a class and field

Sehaj Singh
Sehaj Singh
541 Points

Please allow British English.

You're forcing me to name the variable color. Not everyone who uses treehouse is American. Other correct variations of spelling should be allowed.

GoKart.java
class GoKart {
  String colour = "red";
}

2 Answers

Stuart Wright
Stuart Wright
41,118 Points

While of course Treehouse could change this challenge to accept colour as a variable name, I don't really see much point. As a programmer you'll have to get used to the fact that you'll be using American English a lot. I've never come across a programming language with keywords/functions spelled the British way. For example, in CSS, if you try to write:

p {
 colour: red;
}

That will not work. You must use color.

As a Brit I found this tripping me up a few times when I was starting out, but it's easier to just accept that's the way it is and try to get used to it.

Besides, if you would be working on a project with an American, would you be changing each other variable's names each time you would pull the source code? Bit of a mess, eh.

I use British English all the time however in programming it's best to stick with American, otherwise you open up a whole new can of worms. As Stuart said with CSS you cannot get away with British language and should you use it elsewhere you can confuse other coders who read your code.