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

Java Java Basics Getting Started with Java Strings, Variables, and Formatting

how do I start on my string variable

Name.java
// I have setup a java.io.Console object for you named console

2 Answers

Simon Coates
Simon Coates
8,377 Points

It you're stuck on part 1, it accepts

// I have setup a java.io.Console object for you named console
String firstName = "Bob";

/* //OR You could split it into two statements
String firstName;
firstName = "Bob";
*/
Tsenko Aleksiev
Tsenko Aleksiev
3,819 Points

take it like this: you have a wardrobe full of boxes, each box is labeled and there are different stuff inside them - shoes, socks, shirts and so on. Opening the wardrobe imagine all those boxes, filled with your stuff and now imagine those boxes labeled. Now, when you open and you search for your shoes, you see the “shoes” box. It’s the same in the computers memory: String firstName = “Bob”; Box shoes = “nike”; hope I helped