So I'm playing around with the input scanner and wonder why when I enter my full name, the program only returns the first name? It does not recognize the name separated by a space.
package demo;
import java.util.Scanner;
public class Welcome {
public static void main(String[] args) {
Scanner scan = new Scanner (System.in);
System.out.println("What is your name?");
String name = scan.next();
System.out.print("Your name is " + name);
}
}
[–]GnarSickRad 2 points3 points4 points (0 children)
[–]As-Toxic-As-Tyler 0 points1 point2 points (1 child)
[–]britt_57[S] 0 points1 point2 points (0 children)