Question: using java Create an ArrayList object to store Strings. Write code to do the following... add a string dog add a string cat add a
Create an ArrayList object to store Strings. Write code to do the following... add a string dog add a string cat add a string dog add a string bird add a string animal remove the first occurrence of dog add a string dog add a string dog remove the item at index 4 add a string cat remove all occurences of cat display the array list at this stage Write up some code to continually read in integers from the user. Add these to an ArrayList of Integers. Each time an item is added, display all of the integers in sorted order. Keep doing this until -999 is entered, which indicates the input is done
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
