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

Jaylen Robinson
PLUS
Jaylen Robinson
Courses Plus Student 204 Points

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
3,036 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,813 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