Question: 7. Write a method named promptAndReadInt which will: 1. Prompt the user to enter an integer, using the text Enter an integer: 2. Read
7. Write a method named promptAndReadInt which will: 1. Prompt the user to enter an integer, using the text "Enter an integer:" 2. Read in an integer from the user 3. Return the integer read in 8. Write a method named promptAndReadIntWithPrompt which will: 1. Prompt the user to enter an integer, using a prompt given as a String parameter 2. Read in an integer from the user 3. Return the integer read in
Step by Step Solution
3.37 Rating (156 Votes )
There are 3 Steps involved in it
Here is a Java method named promptAndReadInt which prompts the user to enter an integer and returns ... View full answer
Get step-by-step solutions from verified subject matter experts
