I would use the code:


Scanner input = new Scanner(System.in);

String firstName;
String secondName;

System.out.println("First Name");
firstName = input.next;