Collection framework provides a way to store group of similar objects as a single unit/entity
Collection Framework
- Introduction to collection framework
- Collection interface
- Collection overview for interview preparation
List
- List interface
- ArrayList class
- LinkedList class
- Vector class
- Stack class
- ArrayList v/s Vector
- ArrayList v/s LinkedList
- List v/s Set
Set
- Set interface
- HashSet class
- LinkedHashSet class
- SortedSet interface
- NavigableSet interface
- TreeSet class
- HashSet v/s LinkedHashSet
- HashSet v/s LinkedHashSet v/s TreeSet
- List v/s Set
- HashMap v/s HashSet
Queue
Cursors
Iterating Collection
- Java – Various ways to iterate through ArrayList
- Java – Various ways to iterate through Vector – 5 ways
- Java – Various ways to iterate through LinkedList – 5 ways
- Java – Various ways to iterate through HashSet – 3 ways
- Java – How to reverse LinkedHashSet contents ?
- Java – Various ways to iterate through TreeSet – 3 ways
- Java – Various ways to iterate over List of HashMap
- Java – Ways to iterate over HashMap of ArrayList
- Java – Various ways to iterate Arrays – 5 ways
- Java – How to remove elements while iterating collection object ?
- Java – How to add/remove/modify an element in List while iterating ?
Iterating Collection in Java 8
- Java 8 – Iterating List using forEach() method
- Java 8 – Iterating Set using forEach() method
- Java 8 – Iterating Map using forEach() method
Comparable & Comparator
Sorting Collection
- Java – Sorting ArrayList using Comparable and Comparator
- Java – Sorting ArrayList in descending order
- Java – How to sort LinkedList using Collections.sort() method ?
- Java – How to sort Vector using Collections.sort() method ?
- Java – Sorting list of objects on multiple fields using Comparator
- Java – Sorting HashSet contents in ascending and descending order
- Java – How to Sort HashSet in 2 ways ?
- Java 8 – How to sort HashSet ?
- Java – How to sort LinkedHashSet contents ?
- Java – How to sort TreeSet in descending order using Comparator ?
- Java – Sorting Collection of String, StringBuffer and StringBuilder
- Java – Sorting ArrayList in descending order
- Java 8 – Sorting ArrayList using sort() method of List
- Java – How to Sort String List by its length in Ascending/Descending order ?
Map
- Map interface
- Entry interface
- HashMap class
- LinkedHashMap class
- IdentityHashMap class
- WeakHashMap class
- SortedMap interface
- NavigableMap interface
- TreeMap class
- Hashtable class
- HashMap vs LinkedHashMap
- HashMap v/s LinkedHashMap v/s TreeMap
- HashMap v/s HashSet
- HashMap v/s Hashtable
- Properties class
Iterating Map
- Java – Various ways to iterate through HashMap – 5 ways
- Java – To reverse the order of LinkedHashMap contents
- Java – Various ways to iterate through TreeMap – 5 ways
- Java – Various ways to iterate through Hashtable – 6 ways
- Java – Various ways to iterate over HashMap of ArrayList
Sorting Map
- Java – Sorting HashMap by Keys and Values
- Java – Converting Unordered HashMap into Sorted TreeMap
- Java – How to sort LinkedHashMap by its Keys ?
- Java – How to sort LinkedHashMap by its Values ?
- Java – How to Sort TreeMap by it Keys in descending-order ?
- Java – Sorting Hashtable contents
- Java 8 – Sorting HashMap by Keys and Values using Stream
- Java 8 – How to Sort HashMap entries by its Keys – 6 ways ?
- Java 8 – How to Sort HashMap entries by its Values – 6 ways ?
Collections class
- Java – Collections class a utility class for Collection
- Java – Sorting ArrayList using Comparable and Comparator
- Java – Searching element from ArrayList using Binary Search Algorithm
- Java – How to Reverse order of elements in ArrayList ?
- Java – How to Reverse order of Comparator ?
- Java – How to count duplicate elements of ArrayList ?
- Java – How to swap elements of ArrayList ?
- Java – How to copy elements of one ArrayList to another List ?
- Java – How to shuffle elements of ArrayList and Arrays ?
Unmodifiable version or Read-only
- Java – How to make List or ArrayList unmodifiable List or read-only ?
- Java – How to make Set or HashSet unmodifiable Set or read-only ?
- Java – How to make Map or HashMap unmodifiable Map or read-only ?
- Java – How to make any Collection class as unmodifiable Collection or read-only ?
Synchronized version
- Java – How to get synchronized version of List ?
- Java – How to get synchronized version of Set ?
- Java – How to get synchronized version of Map ?
- Java – How to get synchronized version of Collection ?
Arrays
- Arrays class
- Arrays v/s ArrayList
- Java – Various ways to iterate Arrays in 5 ways
- Java – How to Iterate over char[] Arrays ?
- Java – How to print an Arrays elements in 8 ways ?
- Java – How to find duplicate in String Arrays ?
- Java – Various ways to remove duplicate elements from Arrays in 5 ways
- Java – Searching element from Arrays using Binary Search Algorithm
- Java – How to check whether a number exists in an Arrays or List ?
Arrays Sorting
- Byte Arrays sorting
- char Arrays sorting
- short Arrays sorting
- Integer Arrays sorting
- Float Arrays sorting
- Double Arrays sorting
- Long Arrays sorting
- String Arrays sorting
- Java – How to Sort Arrays in Ascending and Descending order ?
- Java – String Arrays sorting in ascending & descending order
- Java – Sorting after merging two String[] Arrays
- Java – Sorting Arrays using Comparable and Comparator interface
- Java – How to Sort String[] arrays by its length in Ascending/Descending order ?
ArrayList operations
- Java – Creating ArrayList using nCopies method of Collections class
- Java – How to get size or length of an ArrayList ?
- Java – Adding element to ArrayList at specified index position
- Java – Remove element from ArrayList at specified index position
- Java – How to delete a element and delete all elements of an ArrayList ?
- Java- How to get sublist from ArrayList ?
- Java – How to check whether particular element is present in ArrayList ?
- Java – Comparing two ArrayList objects using containsAll() method
- Java – Adding one ArrayList to another ArrayList using addAll() method
- Java – Replacing ArrayList element with new value using set() method
- Java – Various ways to iterate through ArrayList
- Java – How to reverse ArrayList contents ?
- Java – Remove duplicate elements from ArrayList
- Java – How to remove duplicate elements of ArrayList maintaining insertion-order ?
LinkedList operations
- Java – Iterating LinkedList in reverse order
- Java – LinkedList specific method examples
- Java – Push and pop operations with LinkedList
- Java – How to add elements at the beginning and end of LinkedList ?
Set operations
- Java – How to get size or length of HashSet ?
- Java – How to delete a element and delete all elements of HashSet ?
- Java – retainAll() method explanation with HashSet
- Java – How to check whether particular element is present in HashSet ?
- Java – Comparing two HashSet objects using containsAll() method
- Java – Adding one HashSet to another HashSet using addAll() method
- Java – Various ways to iterate through HashSet
- Java – How to reverse LinkedHashSet contents ?
- Java – Sorting HashSet contents in ascending and descending order
- Java – How to Sort HashSet in 2 ways ?
Map operations
- Java – How to get all keys of a HashMap ?
- Java – How to get all values of a HashMap ?
- Java – How to get all Entries or Key-Value pairs of HashMap ?
- Java – How to get size or length of HashMap ?
- Java – How to check whether a particular key is present in HashMap ?
- Java – How to check whether a particular value is present in HashMap ?
- Java – How to check whether HashMap is empty or not ?.
- Java – Adding one HashMap to another HashMap using putAll method
- Java – How to delete an entry of HashMap ?
- Java – How to delete all entries of HashMap ?
- Java 8 – How to remove an entry from HashMap by comparing values
- Java 8 – How to remove an entry from HashMap by comparing keys
- Java 8 – How to store multiple values for single key in HashMap ?
- Java – Various ways to iterate through HashMap
- Java – To reverse order the LinkedHashMap contents
- Java – How ConcurrentModificationException can be handled ?
- Java – How to get Keys from Value in HashMap ?
Conversion and how-to programs
- Java – Conversion of List to Map
- Java – Conversion of Map to List
- Java – Conversion of Arrays to List
- Java – Conversion of List to Arrays
- Java 8 – Conversion of List to Map
- Java 8 – Conversion of Map to List
- Java 8 – Conversion of Arrays to List
- Java 8 – Conversion of List to Arrays
- Java – Conversion of ArrayList to Arrays in 2 ways
- Java – Conversion of Arrays to Vector
- Java – Conversion of Arrays to HashSet
- Java – Conversion of HashSet to Arrays
- Java – Conversion of LinkedList into Vector
- Java – Converting Ordered ArrayList into Sorted TreeSet
- Java – Conversion of ArrayList into HashSet to remove duplicate elements
- Java – How to convert LinkedList to contain unique elements in ascending-order ?
- Java 8 – How to convert HashMap to ArrayList ?
- Java – How to convert ArrayList to LinkedList ?
- Java – How to convert LinkedList to ArrayList ?
Min/Max or Largest/Smallest programs
- Java – How to get maximum element from ArrayList ?
- Java – How to get minimum element from ArrayList ?
- Java – Find Largest number in an Arrays or List ?
- Java – Find Smallest number in an Arrays or List ?
- Java – Find 2nd Largest number in an Arrays or List ?
- Java – Find 2nd Smallest number in an Arrays or List ?
- Java – Find sum of Largest 2 numbers in an Arrays or List ?
- Java – Find sum of Smallest 2 numbers in an Arrays or List ?
- Java – Find 1st and Last elements in an Arrays ?
- Java – Find 1st and Last elements in a List or ArrayList ?
- Java – Find 1st and Last elements in a Set or HashSet ?
- Java – Find 1st and Last entries in a Map or HashMap ?
- Java – Find sum and average of a List or ArrayList ?
- Java – How to calculate sum and average of an Arrays ?
- Java – Find Maximum and Minimum Key/value in a Map ?
Longest & Shortest programs
- Java – Find Longest String in an Arrays or List ?
- Java – Find Shortest String in an Arrays or List ?
- Java – Find 3rd Longest String in an Arrays or List ?
- Java – Find 3rd Shortest String in an Arrays or List ?
- Java – Find all longest Strings in List or Arrays ?
- Java – Find all shortest Strings in List or Arrays ?
Interview Question & Answers
Suggest tutorials from Contact Us page
Happy Coding !!
Happy Learning !!