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

"Set the favoriteColor variable to your favorite color."

I keep getting this error: "Bummer! Identify the different parts of the code. Which part defines the type of the variable? Which part is the name of the variable? What order should they be in? Is 'equals' the correct operator for assigning a value to a variable?"

Here is what I am inputting: String favoriteColor equals = "red";

It should work, the previous challenge was to input my name into the quotes: String myName = "";

Not impressed at all to be honest with you. I'll definitely be taking you up on that offer of a refund. Bye.

3 Answers

Assignment is done with the = operator, not equals =. Remove the equals.

How is someone that just began supposed to know that? At that stage, you are not introduced to any other operators..

Thank you for your input Aaron, I appreciate it.

Anyone have any idea at all? I'm following guidelines to a tee (what little guidelines there are, it's only the second challenge for crying out loud!!!)

I can't believe I actually paid $25 for this lol - I advise anyone wanting to learn Java to go to Udacity and try 'Introduction to Programming' - far better.

Ben Jakuben
Ben Jakuben
Treehouse Teacher

Hi Jay,

Sorry you had such trouble with this! As Derick mentioned, the video explained how the line of code should look. It's very interesting for me to hear what stumps beginners, though, as it has been a long time since I was first trying to figure out the differences between things like "=" and "==".

We are actually planning on a Java Basics course that would give a more thorough introduction and overview of Java. In the Android course, the idea is to teach you the Java you need to know as we hit it in the project.

Hope you decide to stick with us! As you see, the other students and teachers are here to help. It's definitely frustrating at times, but it's a worthy pursuit!

Jay Smith I'm sorry you feel that way about the the program after the second challenge, and giving advice. I believe you should listen and watch the video more intently. Because all the answers are there. Just a humble advise and some of us paid more.