Page 1 of 1

1, Construct an ArrayList of strings. 2. Add the words "Java", "is", "fun" to the ArrayList. 3. Display the contents of

Posted: Sun May 15, 2022 9:58 am
by answerhappygod
1, Construct an ArrayList of strings.
2. Add the words "Java", "is", "fun" to the ArrayList.
3. Display the contents of the list using a for loop.
4. Insert the word "very" at index 2.
5. Display the contents of the list using a for loop.
6. Replace the word "fun" with a different word.
7. Display the contents of the list using a for loop.