
February 22nd, 2013, 05:51 AM
|
 |
Contributing User
|
|
Join Date: Aug 2010
Location: SW Missouri
|
|
At line 59 the Scanner class's nextInt() method tried to read a numeric input but got non-numeric data and threw the exception.
The user should be careful to enter the right data for the program
or the program should be careful when reading data to make sure the right data is available. The Scanner class's hasNext... methods could be used to test the type of the input.
|