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 trialSalvis Are
1,018 PointsFavorite Color String?
Hi,
My command of string favorite color is the following: String favoriteColor = "green";
Probably it is something obvious that there is some kind of mistake in the code, only I am not able to figure it out..
Has anyone else got the same problem?
Thanks, Salvis.
4 Answers
Stone Preston
42,016 PointsI pasted your code
String favoriteColor = "green";
into the challenge engine and passed just fine
Salvis Are
1,018 PointsHmmm,
The challenge engine tells me this: JavaTester.java:19: ';' expected favoriteColor String equals ""; ^ JavaTester.java:19: not a statement favoriteColor String equals ""; ^ JavaTester.java:19: ';' expected favoriteColor String equals ""; ^ 3 errors
Stone Preston
42,016 Pointshmm id start the challenge over and try again. click here to be taken to the challenge again and try one more time.
Salvis Are
1,018 PointsThanks Stone,
This seemed to work now!
Stone Preston
42,016 Pointsglad you got it figured out
Ankit Gupta
Courses Plus Student 63 Pointsto cahnge a color in java string
string favoriteColor ="purple"; String purple ="blue";