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

Blog Reader Project Overview

Hello Again,

Took a small break and I am back :)

Question :

Below the String variables, declare an array of Strings named 'titles'. Initialize it with the three String variables you just created.

My answer :

String title1 = "Android is awesome";
String title2 = "Mike is cool";
String title3 = "Treehouse loves me";

Strings[] titles ={
"title1",
"title2",
"title3",
};

Help please ?

Thanks in advance

3 Answers

Adnan Hasbi could you please be more specific on where to find this code challenge, because your title is not that specific.

From the information that you gave us, this would be the correct way to do it:

String title1 = "Android is awesome";
String title2 = "Mike is cool";
String title3 = "Treehouse loves me";

String[] titles ={ title1, title2, title3};

Note that I removed the "s" at the end of "Strings", removed the quotation marks in the array declaration, and removed the last comma. Hope this helps.

I'm not on this part of the site yet but if you copy and pasted exactly what you had put, I'm pretty sure you don't need last comma in your array. Other than that though, I have no idea.

Thanks guys for the help. Ernest - The code worked for me :)