You can avoid the infinite loop if you create the Scanner oblect inside the try clause.
Type: Posts; User: andreas90
You can avoid the infinite loop if you create the Scanner oblect inside the try clause.
Hello joelamos!
What do you want it to do instead of "repeating"?
When the exception occurs you have the following statement itsAnInt = false; So the while loop keeps going.