Welcome to the Treehouse Community
Looking to learn something new?
i wrote a code using console's printf, and readLine with 2 strings. i think i typed the code right yet i don't know the problem.
// I have imported java.io.Console for you. It is a variable called console. String firstName = "ah"; String lastName = "hii"; console.readLine("what is your name?? ", firstName); console.readLine("what is your last name?? ", lastName); console.printf(" %s first name: ", firstName);
Dino Šporer5,430 Points
String firstName = console.readLine("Enter first name!"); String lastName = console.readLine("Enter last name!"); console.printf("First name: %s %n", firstName); console.printf("Last name: %s %n", lastName);