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!
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
Michael Narvaez
4,182 PointsIm stuck at: Declare a String variable named bestSport and initialize it to the first element of the sports array. help!
it says: Declare a String variable named bestSport and initialize it to the first element of the sports array.
and all I get is: String[] sports = { "basketball", "baseball', "football" };
please help !
3 Answers

alex gwartney
8,849 PointsString[] sports = { "Basketball", "Baseball", "Tennis" };
String bestSport = sports[0];

Michael Narvaez
4,182 PointsThanks a lot !! I was misspelling the second part of the code.

alex gwartney
8,849 Pointsnot a problem yea i think we have all been there lol especially when you have been working on courses all day.

Michael Narvaez
4,182 PointsThis is true !