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 Blog Reader Android App Rebuilding from Scratch Adding Data for the List

Ricky Sparks
Ricky Sparks
22,249 Points

My Java Code wont pass?

public class MainListActivity extends ListActivity {

public String[] mSongTitles = { "Song1", "Song2", "Song3", "Song4" };

}

2 Answers

Chris Shaw
Chris Shaw
26,676 Points

Hi Ricky,

If you're on task one it's only asking for 3 values in the array not four, simply drop Song4 from the array and it will pass.

Shane Desouza
Shane Desouza
3,523 Points

On task one, it didn't say that there was a limit on the maximum number of values, but the minimum number is at least 3 variables. By the way, you should format the mSongTitles array to be a list of values, as below:

public String[] mSongTitles = { "Song1", "Song2", "Song3", "Song4" };

When I displayed it in the horizontal format, for some reason it didn't pass, so when I displayed it in the list view like above, it passed.

Hope this helped you.