I changed the text color of the "while" section
do {
System.out.print("What will be the product ID: ");
while (!scanner.hasNextInt()) {
...
Type: Posts; User: mstratmann
I changed the text color of the "while" section
do {
System.out.print("What will be the product ID: ");
while (!scanner.hasNextInt()) {
...
when I run the code this is the error I am getting
run:
Welcome to the Web Host Ordering System
Exception in thread "main" java.lang.RuntimeException: Uncompilable source code - missing return...
Like I said I am new at this and I found the do{....}while{.....scanner.next();} online for validation
The error I am getting says "while expected" when I try to close the do statement
I am trying to validate that a user input valid information at the prompt but I keep getting errors please help!
Here is my code:
private double computeAverageSales() {
WebHost...