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".
1. Write a Java
2. Change the previous program to insert an element into the array list at the first position.
-
Change the application to print out the index of color "green".
-
Change the previous application to replace "green" value with "yellow".
-
Change the previous application to remove the third element from the list.
-
Change the application to sort the list of colors.
-
Change the application to shuffle the list of colors.
-
Change the application such that it swaps colors "Orange" and "Red".
-
Change the application to close the current list into a new list.
-
Change the application to trim the capacity of the initial array list to the current list size.
-
Change the application to empty the second list.
-
Change the application to test (print out a message) if the second list is empty.
-
Change the application to increase the capacity of the first list to 25 colors.
-
Create an application that creates two array lists list1 ["RED","GREEN","BLACK","WHITE","PINK"] and list2["RED","GREEN","BLACK","PINK"]. Create a new array list that will join list1 and list2.
-

Trending now
This is a popular solution!
Step by step
Solved in 4 steps with 2 images









