print
Advertisment
Advertisment

important interfaces in Collections Framework

We have 9 important interfaces in Collections Framework. which we are explaining below

  • Collection
  • List
  • Set
  • SortedSet
  • NavigableSet
  • Queue
  • Map
  • SortedMap
  • NavigableMap

Collection Interface

If we want to Represent a Group of Individual Objects as a Single Entity then we should use Collections. The collection Interface is considered the Root Interface of the Collection Framework. Collection Interface defines the Most Common Methodswhich are Applicable for any Collection Object.

Difference Between Collection (I) and Collections (C):

  • The collection is an Interface that can be used to represent a Group of Individual Objects as a Single Entity.
  • Whereas Collections is a Utility Class Present in java.util Package to Define Several Utility Methods for Collection Objects.

List Interface

  • It is the Child Interface of Collection.
  • If we want to Represent a Group of Individual Objects as a Single Entity where Duplicates are allowed and Insertion Order is Preserved. Then we should go for List.

Note: In the 1.2 Version onwards vectors and Stack Classes are re-engineered to Implement the List Interface.

Set Interface

  • It is the Child Interface of Collection.
  • If we want to Represent a Group of Individual Objects as a Single Entity where Duplicates are allowed and Insertion Order is Preserved. Then we should go for List.
  • Note: In the 1.2 Version onwards vectors and Stack Classes are re-engineered to Implement the List Interface.

    SortedSet Interface

  • It is the Child Interface of Collection.
  • If we want to Represent a Group of Individual Objects as a Single Entity where Duplicates are allowed and Insertion Order is Preserved. Then we should go for List.
  • Note: In the 1.2 Version onwards Vector and Stack Classes are re-engineered to Implement List Interface.

    NavigableSet Interface

  • It is the Child Interface of Collection.
  • If we want to Represent a Group of Individual Objects as a Single Entity where Duplicates are allowed and Insertion Order is eserved. Then we should go for List.
  • Note: In the 1.2 Version onwards vectors and Stack Classes are re-engineered to Implement the List Interface.

    Advertisment

    Queue Interface

  • It is the Child Interface of Collection.
  • If we want to Represent a Group of Individual Objects as a Single Entity where Duplicates are allowed and Insertion Order is Preserved. Then we should go for List.
  • Note: In the 1.2 Version onwards vectors and Stack Classes are re-engineered to Implement the List Interface.

    Map Interface

  • It is the Child Interface of Collection.
  • If we want to Represent a Group of Individual Objects as a Single Entity where Duplicates are allowed and Insertion Order is Preserved. Then we should go for List.
  • Note: In the 1.2 Version onwards vectors and Stack Classes are re-engineered to Implement the List Interface.

    SortedMap Interface

  • It is the Child Interface of Collection.
  • If we want to Represent a Group of Individual Objects as a Single Entity where Duplicates are allowed and Insertion Order is Preserved. Then we should go for List.
  • Note: In the 1.2 Version onwards Vector and Stack Classes are re-engineered to Implement List Interface.

    NavigableMap Interface

  • It is the Child Interface of Collection.
  • If we want to Represent a Group of Individual Objects as a Single Entity where Duplicates are allowed and Insertion Order is Preserved. Then we should go for List.
  • Note: In the 1.2 Version onwards vectors and Stack Classes are re-engineered to Implement the List Interface.

    Advertisment


    Advertisment
    Advertisment
    arrow_upward