The above code does exactly what you're trying to do but with half the lines.

05-09-2011, 10:07 AM

BZwap

First of all remove "{" from this code-
catch(IOException e) {
System.out.println("Error reading keyboard input") ;
__________________________________________________ ______
Then remove a "{" from here-
System.out.println("Invalid value. Did you enter a number?") ;
}
__________________________________________________ ______
I hope that this will work