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 (retired 2014) Learning the Language Introduction to Arrays

What should I do?

What should I do in the challenge task 2 of 4?I don't know what should I do in this step.Give me some help,thank you.

http://teamtreehouse.com/library/build-a-simple-android-app/learning-the-language/introduction-to-arrays.

5 Answers

Paul Stevens
Paul Stevens
4,125 Points

Hello,

I copied those directly from the Code Challenge as I did it. It was accepted as the correct answer. They should work.

For Task one the code should look like :

String[] frogNames = {"a","b","c"}; 

For Task two the code should look like:

String[] frogNames = {"a","b","c"}; 
String bestFrog = frogNames[0];

Hope this helps, Paul :)

can you give me a way to contact with you,then I can ask you directly if I have problems.I am deeply hope you can give me a reply,Thank you.

Paul Stevens
Paul Stevens
4,125 Points

Hello,

String[] frogNames = {"a","b","c"}; 
String bestFrog = frogNames[0];

The second line declares a String variable called bestFrog and then puts the first element (starts at zero) of frogNames into it. In this bit of code bestFrog would equal "a".

Hope this helps,

Paul :)

Hello,I tried you way,but it doesn't work,but I still thank you.

Thank you,it works,can you give me a way to contact with you,then I can ask you directly if I have problems.Thank you.,

Paul Stevens
Paul Stevens
4,125 Points

Hello,

You have a way to contact me. Anytime you reply to me I get an Email. I'm not very good though, I have only just started the lessons as well. I check the forum a lot to see if I can help though.

Paul :)

ok thank you?