So i am wondering how I can check a string that has been inputed by the user for multiple spaces, and if it does have multiple spaces between words, i want the user to be re-prompted for input. I am using a do- while loop. here is the format:
Scanner scanner01 = new Scanner(System.in);
String inputLast;
do {
System.out.println("Enter a valid LAST name: ");
inputLast = scanner01.nextLine();
} while()