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

Javier Montoya
Javier Montoya
105 Points

Possibly missing something?

Hello. I am having issues writing this part of the code in java. I have written it the following way (attached) just as it is shown in the video.

Color.java
string favoriteColor = "green";

2 Answers

Harry James
Harry James
14,780 Points

Hey Javier!

Welcome to Android! You were very close with the challenge and the reason it was failing is because String should be with a capital letter.

In Java, a String is what we call a non-primitive data type - there are only 8 primitive data types and these are the only "types" that don't start with a capital.

Don't worry about understanding anything about primitive and non-primitive just yet though! Ben will explain all of this later on in the courses :)


Hope it helps and if there's anything else, feel free to tag me on the Community with @Harry James ;)

Christopher Augg
Christopher Augg
21,223 Points

Javier,

Almost perfect! You just have a small typo. String has a capital S. You have declared it with a lowercase s. Just change string to String and you should pass!

Good job.

Chris