Collection Types
Legacy collections, introduced in JDK 1.0, like Hashtable and Vector, are thread-safe but slow due to synchronization. JDK 1.2 brought the Collections Framework, offering non-thread-safe utility collections such as HashMap and ArrayList, while also allowing legacy collections to be wrapped in synchronized versions for multithreading. Concurrent collections, introduced in Java 5, eliminated the need for client-side locking and typically perform better through strategies like Copy on Write and Compare and Swap. The core collection interfaces include Set, List, Queue, Deque, and Map, forming the foundation of the Java Collections Framework.
We'll cover the following...
We'll cover the following...
1.
What are legacy collections?
Show Answer
1 / 3
...