Top 10 collection framework interview questions and answers in java - PART 1

1. What is difference between HashMap and Hashtable ?

  Read Differences between HashMap and Hashtable here → 

2. Differences between Comparable and Comparator?

  Read all about Comparable and Comparator here → 

3. How can we sort a list of Objects?

  How to sort an Array of Person objects using Comparable 

  How to sort an ArrayList of Person objects using Comparable

  How to sort an Array of Person objects using Comparator

  How to sort an ArrayList of Person objects using Comparator

4. What is difference between fail-fast and fail-safe Iteration?

  Difference between fail-fast and fail-safe

5. Differences between arraylist and vector?

  Read Here the differences between an ArrayList and Vector

6. Explain the Java Collections Framework

  Collection Framework

7. Which design pattern Iterator follows?

  Read here

8. How HashSet works internally ?

  How HashSet works internally in Java

9. Difference between HashSet vs. TreeSet and LinkedHashSet

  Difference between HashSet vs. TreeSet and LinkedHashSet

10. What are the differences between Iterator and Enumeration ?

  Differences between Iterator and Enumeration

COLLECTIONS ARRAYLIST SET