top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

What are the basic interfaces of Java Collections Framework ?

+3 votes
325 views
What are the basic interfaces of Java Collections Framework ?
posted Oct 21, 2014 by anonymous

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

1 Answer

0 votes

Java Collection Framework has four basic interfaces - Collection, Set, List and Map

Collection is the root of the collection hierarchy. A collection represents a group of objects known as its elements.
Set is a collection that cannot contain duplicate elements. This interface models the mathematical set abstraction and is used to represent sets, such as the deck of cards.
List is an ordered collection and can contain duplicate elements. You can access any element from it’s index. List is more like array with dynamic length.
Map is an object that maps keys to values. A map cannot contain duplicate keys: Each key can map to at most one value.

answer Oct 21, 2014 by Salil Agrawal
...