Write a getint method that takes as input a string prompt


Problem:

Question- Write a getInt() method that takes as input a String prompt and a Scanner, and returns an integer. This method prompts a user for an integer. If the entered value is an integer, then it is returned. If it is not an integer, then this method must re-prompt until an integer is entered.

Please show code with comments so I can follow what you are doing.

Request for Solution File

Ask an Expert for Answer!!
Computer Engineering: Write a getint method that takes as input a string prompt
Reference No:- TGS0893772

Expected delivery within 24 Hours