What KucerakJM said is right, your looking to catch if there is a non-number input, so the exception would be the NumberFormatException.
[quote]



while(true) {
try {

// Code to...