How to insist that a users input is an int?
问题 Basic problem here.. I will start off by asking that you please not respond with any code, as that likely will only confuse me further (programming noob). I am looking for a clear explanation on how to solve this issue that I'm having. I have a scanner that reads input from the user. The user is prompted to enter an int value between 1 to 150 (whole numbers only). I obtain the value as follows: Scanner scan = new Scanner(System.in); int input = scan.nextInt(); And continue on with my program,