Java Java Basics Getting Started with Java IO

Joshua Fetty
Joshua Fetty
315 Points

console.printf("%s\n", firstName); how do i get it to say the first name?

im lost that should just say the first name i thought?
// I have imported for you.  It is a variable called console.
String firstName = console.readLine("what is your First name?  ");
String lastName = console.readLine("What is your last name?  ");
 console.printf("%s\n", firstName);

1 Answer

Jeremy Englert
Jeremy Englert
Pro Student 1,247 Points

'''console.printf("First Name: %s %n" , firstName);''' I believe that is what you're looking for. Im pretty sure you have to put "First Name:" in the printf line