1.
ArrayList Practice Questions-
Q1. Create a List of integers using ArrayList, and add 5 elements. Print them
using a for-each loop.
Q2. Insert an element at a specific index and remove one.
Q3. Write a program to copy all elements from one ArrayList to another.
Q4. Sort an ArrayList of integers and print the maximum and minimum value.
Q5. Write a method that takes an ArrayList<String> and returns another
ArrayList with only strings that start with the letter 'A'.
2. LinkedList Practice Questions-
Q1. Create a LinkedList of city names and perform:
Add elements at the beginning and end
Remove the first and last element
Q2. Use getFirst() and getLast() to retrieve elements.
(Tip: Use LinkedList<String> directly instead of List to access these)
3. Vector Practice Questions-
Q8. Create a Vector<Integer> with 10 elements and remove all elements using
removeAllElements().
Q9. Demonstrate how Vector is synchronized by showing multiple threads adding to it.
4. Stack Practice Questions-
Q1. Implement a menu-driven program:
a. Push element
b. Pop element
c. Peek top
d. Display stack
e. Exit
Q2. Reverse a string using Stack<Character>.