Before calling nextInt(), is it necessary to check boolean hasInput = scanner.hasNext();?
Before calling nextInt(), is it necessary to check boolean hasInput = scanner.hasNext();?