1.

Explain the hierarchy of the Collection framework in Java.

Answer»

The entire collection FRAMEWORK hierarchy is MADE up of FOUR fundamental INTERFACES: Collection, List, Set, Map, and two specific interfaces for SORTING called SortedSet and SortedMap. The java.util package contains all of the collection framework's interfaces and classes. The following diagram depicts the Java collection structure.

Here, e denotes extends, i denotes implements

  • Extends: The keyword extends is used to create inheritance between two classes and two interfaces.
  • Implements: The keyword implements are used to create inheritance across classes and interfaces.


Discussion

No Comment Found