Java Collection Programs
ArrayList, HashMap, HashSet, TreeMap, Queue and related collection APIs.
Linked List Example in Java
This class stores the elements in nodes that each have a pointer to the previous and next nodes in the list. A Java example with source code and sample output.
Arraylist Example in Java
The ArrayList class extends AbstractList and implements the List interface. A Java example with source code and sample output.
Hashset Example in Java
A set can't have any duplicate elements in it. A Java example with source code and sample output.
Clear an Arraylist Example in Java
An ArrayList is a non-syncronized class. A Java example with source code and sample output.
Reversing an Arraylist Example in Java
An ArrayList is a non-syncronized class. A Java example with source code and sample output.
Linked Hashset Example in Java
HashSet uses a hash table. A Java example with source code and sample output.
Hashmap Example in Java
A Hashmap is a Map data structure. A Java example with source code and sample output.
Set Value in Arraylist Example in Java
An ArrayList is a non-syncronized class. A Java example with source code and sample output.
Linked Hashmap Example in Java
HashMap uses a hash table. A Java example with source code and sample output.
Remove Element from Arraylist Example in Java
An ArrayList is a non-syncronized class. A Java example with source code and sample output.
Identity Hashmap Example in Java
Identity HashMap is a HashTable based implementation of Map Interface. A Java example with source code and sample output.
Treemap Example in Java
Maps are defined by the java.util.Map interface in Java. A Java example with source code and sample output.
Treeset Example in Java
TreeSet uses a red-black tree implemented by a java.util.TreeMap. A Java example with source code and sample output.
Finding Duplicates in Array using Treeset Example in Java
TreeSet uses a red-black tree implemented by a java.util.TreeMap. A Java example with source code and sample output.
Hashtable Example in Java
A hash table is a data structure used to implement an associative array, a structure that can map keys to values. A Java example with source code and sample output.
Enumset Example in Java
EnumSet inherits AbstractSet and implements Set Interface. A Java example with source code and sample output.
Enum Map Example in Java
EnumMap is a specialized Map implementation for use with enum type keys. A Java example with source code and sample output.
Wrapper Example in Java
Wrapper in Java: a complete example program with source code and sample output, explained step by step.
Un Modifiable Wrapper Example in Java
Un Modifiable Wrapper explained in Java, with a complete example program, its sample output, and a clear code walkthrough.
Iterator Interface Example in Java
A Java example program demonstrating Iterator Interface, complete with the source code and expected sample output.
Sorted Map Interface Example in Java
Sorted Map Interface defines a map that's sorted by the keys provided. A Java example with source code and sample output.
Sorted Set Interface Example in Java
Sorted Set Interface explained in Java, with a complete example program, its sample output, and a clear code walkthrough.
Java Stream API Example in Java
Introduction to the Java Stream API with filter, map, sorted and collect operations on a list of integers and strings, with sample output.