This tutorial describes the Java Collections Framework. Here, you will learn what collections are and how they can make your job easier and programs better. You'll learn about the core elements — interfaces, implementations, aggregate operations, and algorithms — that comprise the Java Collections Framework.
The Java Collections Tutorial source code examples have been written using JDK 8 or later. Source code examples and practices described in this tutorial are well tested in our development environment.
Getting Started
Interfaces
- Collections Framework - The Collection Interface
- Collections Framework - The Set Interface
- Collections Framework - The SortedSet Interface
- Collections Framework - The List Interface
- Collections Framework - The Queue Interface
- Collections Framework - The Deque Interface
- Collections Framework - The Map Interface
- Collections Framework - The SortedMap Interface
List Implementations
General-Purpose List Implementations:
Special-Purpose List Implementations:
Set Implementations
General-Purpose Set Implementations:
Special-Purpose Set Implementations:
Map Implementations
General-purpose Map Implementations:
- Collections Framework - HashMap Class
- Collections Framework - LinkedHashMap Class
- Collections Framework - TreeMap class
Special-Purpose Map Implementations:
Sorting
Aggregate Operations(Streams)
Collections Helper/Utility Classes
- java.util.Collections Class API Guide(Development)
- 18 Useful Collections Utility Methods (Development)
- Java CollectionUtils Class(Development)
Convert Collections Examples
- Conversion Between Array and Set in Java
- Conversion Between Array and List in Java
- Java Convert Map to Set Example
- Java Convert Map to List Example
- Java Convert Map to Array Example
- Convert a Map to an Array, List and Set in Java
- Java 8 Convert List to Map Example
- Java 8 - Merging Two Maps Example
- Java Convert Array to String [Snippet]
Collections Examples
- Different Ways to Iterate over List, Set and Map in Java
- Java Comparator Interface Example
- Java Comparable Interface Example
- Java IdentityHashMap Example
- Java WeakHashMap Example
- Java EnumMap Example
- Java CopyOnWriteArraySet Example
- Java EnumSet Class Example
- Guide to Java 8 forEach Method
- Different Ways to Iterate over a List in Java [Snippet]
- Different Ways to Iterate over a Set in Java [Snippet]
- Different Ways to Iterate over a Map in Java [Snippet]
- Iterate over TreeSet in Java Example
- Iterate over LinkedHashSet in Java Example
- Remove First and Last Elements of LinkedList in Java
- Iterate over LinkedList using an Iterator in Java
- Search an Element in an ArrayList in Java
- Iterate over ArrayList using Iterator in Java
- Remove Element from HashSet in Java
- Iterating over a HashSet using Iterator
Collections Differences
- Difference between LinkedList vs ArrayList in Java
- Difference between List and Set in Java Collection
- Difference between Stack and Queue Data Structure in Java
- Difference between HashMap and HashSet in Java
- Difference between TreeSet, LinkedHashSet, and HashSet in Java with Example
- Difference between EnumMap and HashMap in Java
- Difference between HashMap and HashSet in Java
- Difference between ArrayList and Vector in Java
- Difference between HashMap, LinkedHashMap, and TreeMap in Java
- Difference between PriorityQueue and TreeSet in Java?
- What is the difference between Enumeration and Iterator in Java?
- What is the difference between HashMap and Hashtable in Java?
- Difference between fail-fast Iterator vs fail-safe Iterator in Java
Best Practices and Interviews
- Java Collection Framework Best Practice (Best Practice)
- Difference between Array vs ArrayList in Java (interview)
- How the Size of the ArrayList Increases Dynamically? (interview)
- How To Remove Duplicate Elements From ArrayList In Java? (interview)
Productive tutorial. Top Java blog web site with up-to-date tutorials, guides, articles. Highly recommended to every Java beginners and developers.
ReplyDeleteAwesome resources for learning java. I am daily going through it.
ReplyDeleteThank you.
Delete