Question: Java: Write a user entry method that asks the user to enter an whole number. You should use the appropriate loop to ask the user
Java:
Write a user entry method that asks the user to enter an whole number. You should use the appropriate loop to ask the user repeatedly until the user decides to quit. You will need to decide what sentinel value will cause the loop to end.
Store the number in an Integer object.
Append the Integer object to the end of the ArrayList.
When the user quits, print out:
the number of ArrayList slots used, and
a list of the ints contained within the Integers stored in the ArrayList.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
