import java.util.Scanner;
public class InputTest {
public static void main(String[] args) {
Scanner input = new Scanner(System.in);
System.out.print("Enter your first name : ")
String Answer = input.next();
System.out.println(Answer + " is your first name.");
}
}
if the user inputs John
,
the output will say : John is your first name.
My question : How can I change the output to "John"
instead of John
.