This is how my code looks so far.
public static void main(String[] args){
Scanner keyboard = new Scanner(System.in);
String name, age, job;
System.out.println("What is your name?");
name = keyboard.next();
System.out.println("How old are you?");
age = keyboard.next();
System.out.println("What do you do for a living?");
job = keyboard.next();
System.out.println("Your name is " + name + ". You are " + age + " year old. And you live as a " + job + ".");
}
If possible I'd like to learn it in details because it's something I really want to learn.
Every time the program gets the "job" input, only the first word before the space is stored into the "job" variable.
Thanks in advance. This is my first thread here. Hopefully, I'll be a part of this awesome community. :)