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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started