Question: In Java Part #1: Practice with the ArrayList Uring this lab you will get practice using the ArrayList class in Java. Write a Java program

 In Java Part #1: Practice with the ArrayList Uring this lab

In Java

Part #1: Practice with the ArrayList Uring this lab you will get practice using the ArrayList class in Java. Write a Java program that does the following Create an ArrayList Populate it with ten random numbers between 0 and 100 -Print the size of the list Prints whether the list is empty Checks to see if the list contains 50 and 75 (probably won't but it could - the list is random) Prints the entire list Adds the number 9999 to position 5 then prints the list again and checks the size (should be 11) Removes the item at position nine then prints the list and checks the size again (should be 10) Sets position 5 to 7777 then prints the list and checks the size again (should still be 10) Challenge: Can you remove number 7777 using the number 7777 (not using i's position 5)? Part #2: Practice with the LinkedList Perform the same operations as above but use a LinkedList instead

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!