Collection framework Tutorial in java in detail with diagrams and programs



Basic Collection tutorial in core java >

Collection tutorial in java


List tutorial in java >

java.utilArrayList tutorial in java


java.util.LinkedList tutorial in java



Set tutorial in java >

java.util.HashSet tutorial in java



EnumSet tutorial in java with program




Map tutorial in java >

HashMap tutorial in java


ConcurrentHashMap tutorial in java - with Segments formation in detail with diagram



IdentityHashMap tutorial in java with program


WeakHashMap tutorial in java


EnumMap tutorial in java with program




Basic Collection tutorial in core java - All properties in tabular form >

Collection tutorial in java - java.util.List, java.util.Set and java.util.Map all properties in tabular form



Collection framework java tutorial : Collection hierarchy in core java >

List hierarchy tutorial in java - Detailed - java.util.ArrayList, java.util.LinkedList, java.util.vector, java.util.concurrent.CopyOnWriteArrayList classes


Set hierarchy tutorial in java - Detailed - java.util.HashSet, java.util.concurrent.CopyOnWriteArraySet, java.util.LinkedHashSet, java.util.TreeSet, java.util.concurrent.ConcurrentSkipListSet, java.util.EnumSet classes


Map hierarchy tutorial in java - Detailed - java.util.HashMap, java.util.Hashtable, java.util.concurrent.ConcurrentHashMap, java.util.LinkedHashMap, java.util.TreeMap, java.util.concurrent.ConcurrentSkipListMap, java.util.IdentityHashMap, java.util.WeakHashMap, java.util.EnumMap classes



ConcurrentModificationException , Fail-fast and Fail-safe >

ConcurrentModificationException, Fail-fast and Fail-safe in detail in java



Collection framework java tutorial : Important Collection - Similarity and Differences in core java >

Difference between List, Set and Map in java


List Differences tutorial in java >

ArrayList vs LinkedList - Similarity and Differences in java


ArrayList vs Vector - Similarity and Differences in java


List vs Set - Similarity and Differences in java





Map Differences tutorial in java >

Similarity and Differences between HashMap and Hashtable in java


Similarity and Differences between HashMap and ConcurrentHashMap - in java


HashMap vs Hashtable vs LinkedHashMap vs TreeMap - Differences in java


Similarity and Differences between HashMap vs IdentityHashMap - with program in java



Differences between few more important Collection framework classes in java >


Collection vs Collections - Differences between in java



Similarity and Differences between Iterator vs ListIterator - in java


Differences and similarities between Iterator vs Enumeration - in java


Convert Array to list, list to array,
Array to set, Set to array in java>

How to convert ArrayList to HashSet and Set to Array in Java examples

convert Array to Set and Set to array in Java

How to convert Array to List and ArrayList to array in Java



Map to List conversion >

How to convert Map to List in java




Synchronize ArrayList - collection framework tutorial in java tutorial >


What is default capacity of ArrayList and Vector, and how they are resized in collection framework tutorial in core java >


Collection framework java tutorial : Important Similarity and Differences Collection classes in concurrent and non-concurrent packages in java >

ArrayList vs CopyOnWriteArrayList - Similarity and Differences with program in java


HashSet vs CopyOnWriteArraySet - Similarity and Differences with program in java


TreeSet vs ConcurrentSkipListSet - Similarity and Differences with program in java


TreeMap vs ConcurrentSkipListMap - Similarity and Differences with program in java




Collection framework java tutorial : Sorting Collection by implementing comparator and Comparable, using TreeMap and TreeSet, Collections.sort and Arrays.sort tutorial in java >

Comparable vs Comparator - differences and sorting list by implementing Comparable and Comparator in classes and inner classes in java


Arrays.sort to sort arrays by implementing Comparator and how Comparator of superclass can be used by subclasses in java


Sort Set by using TreeSet and by implementing Comparator and Comparable interface in java


Sort Map by key in Ascending and descending order by implementing Comparator interface and overriding its compare method and using TreeMap in java


Sort Map by value in Ascending and descending order by implementing Comparator interface and overriding its compare method in java








Consequence and advantage of using ArrayList and Vector tutorial in multithreading environment in java >

Consequence of using ArrayList in multithreading environment in java


Advantage of using Vector in multithreading environment in java





>>>> Collection framework Programs and examples in core java >>>>

java.util.ArrayList Programs in java >
>ArrayList tutorial - add, add element at specific index methods program in java
>ArrayList tutorial - remove, get, contains and set methods program in java
>ArrayList tutorial - iterate using iterator, listIterator, Enumeration and enhanced for loop in java
>ArrayList tutorial - fail-safe or fail-fast iteration using iterator, listIterator, Enumeration and enhanced for loop example in java
>ArrayList tutorial - isEmpty, size and clear methods program in java
>ArrayList tutorial - synchronizing using Collections.synchronizedList example in java

>ArrayList tutorial - making list unmodifiable using Collections.unmodifiableList example in java


LinkedList Programs in java >


java.util.Vector Programs in java >

>Vector tutorial - add, add element at specific index methods program in java
>Vector tutorial - remove, get, contains and set methods program in java
>Vector tutorial - iterate using iterator, listIterator, Enumeration and enhanced for loop example in java
>Vector tutorial - fail-safe or fail-fast iteration using iterator, listIterator, Enumeration and enhanced for loop example in java














Hashtable Programs in java >



java.util.TreeMap Programs in java >



LinkedHashMap Programs in java >


java.util.concurrent.ConcurrentHashMap Programs in java >

Program to use ConcurrentHashMap’s putIfAbsent method in java

Program to create method that provides functionality similar to putIfAbsent method of ConcurrentHashMap and to be used with HashMap in java




Programs to sort Collection framework classes in java >>

Collection framework java tutorial : Different approaches/Programs to Sort List in java >
Program to sort Employee list on basis of name in ascending order by implementing Comparable interface and overriding its compareTo method in java


Program to sort Employee list on basis of name in descending order by implementing Comparable interface and overriding its compareTo method in java


Program to sort Employee list on basis of name in ascending order by implementing Comparator interface and overriding its compare method in java


Program to sort Employee list on basis of name in descending order by implementing Comparator interface and overriding its compare method in java


Program to sort Employee list on basis of name and id in ascending order by implementing Comparator interface and overriding its compare method in java


Program to sort Employee list on basis of name and id in ascending order by implementing Comparator interface in inner and static inner class and overriding its compare method in java




Collection framework java tutorial : Different approaches/Programs to Sort Arrays in java >
Program to sort Integer array using Arrays.sort (by default Arrays.sort will sort array in ascending order) in java


Program to sort Integer array by using Arrays.sort (we will define Comparator to sort elements in descending order) in java


Program to sort Employee array using Arrays.sort in ascending order on basis of name and id by implementing Comparator interface in java


Program to understand Comparator of superclass can be used by subclasses in java




Collection framework java tutorial : Different approaches/Programs to Sort Set in java >
Program to Sort Set by using TreeSet(by default elements are sorted in ascending order), where elements are Integer type in java


Program to Sort Set by using TreeSet(we will define Comparator to sort elements in descending order), where elements are Integer type in java.


Program to Sort Set in Ascending order by using TreeSet and implementing Comparable interface, where elements are customObject/Employee type in java.


Program to Sort Set in Ascending order by using TreeSet and implementing Comparator interface, where elements are customObject/Employee type in java.


TreeMap’s addAll method to sort java Collection framework classes in java


TreeMap’s constructor to sort java Collection framework classes in java





Collection framework java tutorial : Different approaches/Programs to Sort Map by key in java >

Program to Sort Map by key in Ascending order by implementing Comparator interface and overriding its compare method in java


Program to Sort Map by key in Descending order by implementing Comparator interface and overriding its compare method in java

Program to Sort Map by key in Ascending order by using TreeMap, where key is Integer type in java.


Program to Sort Map by key in Ascending order by using TreeMap and implementing Comparable interface, where key is customObject/Employee type in java


Program to Sort Map by key in descending order by using TreeMap and implementing Comparator interface, where key is Integer type in java


TreeMap’s putAll method to sort map on basis of key in java


TreeMap’s constructor to sort map on basis of key in java



Collection framework java tutorial : Different approaches/Programs to Sort Map by value in java >

Program to Sort Map by value in Ascending order by implementing Comparator interface and overriding its compare method in java


Program to Sort Map by value in Descending order by implementing Comparator interface and overriding its compare method in java






Summary -
In this core java tutorial we learned about exception handling in java in detail.

Having any doubt? or you liked the tutorial! Please comment in below section.
Please express your love by liking JavaMadeSoEasy.com (JMSE) on facebook, following on google+ or Twitter.


RELATED LINKS>

Thread Tutorial in java

Thread Concurrency Tutorial in java

Exceptions Tutorial in java in detail with diagrams and programs



eEdit
Must read for you :