Collections Framework – Multiple Choice Questions (MCQs)
-
-
38. Which collection class provides thread-safe operations?
-
39. Which collection class is a thread-safe alternative to `ArrayList`?
-
40. Which collection class is a thread-safe alternative to `HashMap`?
-
41. What is the difference between `Vector` and `ArrayList`?
-
42. What is the difference between `Hashtable` and `HashMap`?
-
43. Which interface represents a collection that supports removal of elements while iterating?
-
44. What is the purpose of the `remove()` method of the `Iterator` interface?
-
45. What happens if you try to modify a collection while iterating over it using a standard `for-each` loop?
-
46. Which interface represents a double-ended queue?
-
47. Which class implements the `Deque` interface?
-
48. Which class provides a Last-In-First-Out (LIFO) stack implementation?