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

Android Build a Simple Android App (2014) Getting Started with Android Troubleshooting Java

how to you change the color on java app

well it say to fix favorite color string equals ""; ,how do I fix this

Color.java
string color red  = "red";

3 Answers

You're looking for this:

String favoriteColor = "red";

Remember, you always need to capitalize the S in String

it didn't work

Could you link a picture/your updated code so I can see exactly what you're putting in?

Ollie Prentice
Ollie Prentice
11,685 Points

You have missed the capital letter on String.

Also your variable doesn't need "red".

String color = "red";

Or you could name the variable favouriteColor.

String favouriteColor = "red";

If these examples don't work, could you please provide more info.