Welcome to the Treehouse Community
Looking to learn something new?
i only need black
favoriteColor String equals "black";
Aaron Kaye10,936 Points
So what this challenge want's you to do is to create a new Java variable named favoriteColor and set it equal to it, in your case "black".
Java variables are defined by the following:
Type variableName = value;
The challenge gives you the hint that your type is a String, it also gives you a variable name, and now you need to substitute in the value. See if you can figure it out now and if not we'd be happy to help more!
Nicolas Hampton44,625 Points
Declare the type of variable before the name of the variable, then use the = sign instead of using the word. It should look like this:
String favoriteColor = "black";