Java Java Basics Getting Started with Java IO

Declare a variable that is named the camel-cased version of "first name". Store the user's first name into this new vari

What is the answer to this one please help. I can't move on Declare a variable that is named the camel-cased version of "first name". Store the user's first name into this new variable using console.readLine.

IO.java
public class name {

    public static void main(String[] args) {
        Console console = System.console();
        String firstname = console.readLine("What is your name? ");        
  }
}

I got it

1 Answer

Steve Hunter
MOD
Steve Hunter
Treehouse Moderator 55,902 Points

Hi there,

You need to take the instructions literally. Just declare a variable that is the camel case version of first name. It's one line which you have already written but you missed out the uppercase N in firstName.

String firstName = console.readLine("What is your name? ");

Steve.