I have made this program and I have gotten stuck. When I run it and I have inputs without using spaces it works fine, for example just Bob
input in customer input. However, when I enter Bob White
, it merges the next two string input directions (as Shown in pic attached) . What am I doing wrong here?
import java.util.*;
public class Blah{
public static void main(String[] args){
Scanner in = new Scanner(System.in);
String customerName;
System.out.println("Enter customer name: ");
customerName = in.next();
String customerAddress;
System.out.println("Enter customer address: ");
customerAddress = in.next();
String customerPhoneNumber;
System.out.println("Enter customer phone number: ");
customerPhoneNumber = in.next();
in.close();
}
}