What is in the Java Collections Framework? How do List, Set, Map and Queue differ?
Short answer
The Collections Framework is the set of interfaces and classes in java.util for holding groups of objects: List, Set, Queue, Map. Choose by the operation you call most.
3 points to say:
- Code against interfaces, e.g.
List. Mapis not aCollection.- Choose by operation, not by habit.
Keep reading the deep dive
Create a free account to read the full explanation and follow-up questions, mark questions as studied and review them on a schedule.