Question: This task has the following elements that are relevant to the learning outcomes of this module: - use ArrayList to save, find, insert items -

This task has the following elements that are relevant to the learning outcomes of this module: - use ArrayList to save, find, insert items - convert from an array to an ArrayList - shuffle a list using your own method, sort a list You should write a simple Java class that will perform some operations on an ArrayList Create an Integer array of ten objects that you initialize with values 1 to 10. Convert it to an ArrayList object. Add a number Remove one of the numbers in the list. Ask the ArrayList object if it contains added value and the value that was removed. Create a method (do not use built-in shuffle methods) to put the values in a random order Arrange the array list in descending order and print it. Example of printing is:

Does list contain 42? Yes Does list contain 9? No 4 2 5 1 0 3 8 7 6 42 42 8 7 6 5 4 3 2 1 0

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!