1. Write a Java program to create a new array list, add some colors (string) and print out the collection. The list should contain color "green". 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.
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 now
This is a popular solution!
Step by step
Solved in 3 steps with 1 images