I have a Java program that is designed to take an input of customers, then run a loop for each. Then the user has 3 choices to input: clowns, safari sam, or music caravan. I jus
You need to use nextLine()
instead of next()
to read user input. nextLine()
will read the entire line, but next()
will only read the next word.
For reading String provided by the user in console you have to use .nextLine() So try by using this -
String service_type = new_scan.nextLine();
This should store the value of whatever you are providing in the console to the String "service_type".