A create an arraylist of type string and prompt the user


a) Create an Arraylist of type String and prompt the user for three names and add these names to your ArrayList.

b) Print a message with the number of elements in the ArrayList for the user using the size() method (to find the number to print.)

c) Prompt the user for two more names and add them to the ArrayList and once again print a message with the number of elements in the ArrayList for the user

d) Use a loop to print all of the names in the ArrayList for the user.

Solution Preview :

Prepared by a verified Expert
Basic Computer Science: A create an arraylist of type string and prompt the user
Reference No:- TGS01682990

Now Priced at $20 (50% Discount)

Recommended (98%)

Rated (4.3/5)