
1. Write a Java
2. Change the previous program to insert an element into the array list at the first position.
3. Change the application to print out the index of color "green".
4. Change the previous application to replace "green" value with "yellow".
5. Change the previous application to remove the third element from the list.
6. Change the application to sort the list of colors.
7. Change the application to shuffle the list of colors.
8. Change the application such that it swaps colors "Orange" and "Red".
9. Change the application to copy the current list into a new list.
10. Change the application to trim the capacity of the initial array list to the current list size.
11. Change the application to empty the second list.
12. Change the application to test (print out a message) if the second list is empty.
13. Change the application to increase the capacity of the first list to 25 colors.

Trending nowThis is a popular solution!
Step by stepSolved in 3 steps with 1 images

- This is the file :arrow_forward// The language is java, please take a screenshot of your output, and make sure your code is run.arrow_forwardGiven an ArrayList called myAL that contains the following: ["blue", "red", "yellow"] write code to insert the elements "purple" and "orange" that keeps the list in alphabetical order.arrow_forward
- Database System ConceptsComputer ScienceISBN:9780078022159Author:Abraham Silberschatz Professor, Henry F. Korth, S. SudarshanPublisher:McGraw-Hill EducationStarting Out with Python (4th Edition)Computer ScienceISBN:9780134444321Author:Tony GaddisPublisher:PEARSONDigital Fundamentals (11th Edition)Computer ScienceISBN:9780132737968Author:Thomas L. FloydPublisher:PEARSON
- C How to Program (8th Edition)Computer ScienceISBN:9780133976892Author:Paul J. Deitel, Harvey DeitelPublisher:PEARSONDatabase Systems: Design, Implementation, & Manag...Computer ScienceISBN:9781337627900Author:Carlos Coronel, Steven MorrisPublisher:Cengage LearningProgrammable Logic ControllersComputer ScienceISBN:9780073373843Author:Frank D. PetruzellaPublisher:McGraw-Hill Education





