Powered by Blogger.

Wednesday, 18 June 2014

9 Interfaces of Collection Framework

By Shambhu Kumar  |  00:54 No comments

9-Key Interfaces of Collection Framework
  1. Collection
  2. List
  3. Set
  4. SortedSet
  5. NavigableSet
  6. Queue
  7. Map
  8. SortedMap
  9. NavigableMap
 Basic Details of all 9 Interfaces

  1. Collection:
    1. If we want to represent a group of invidual objects as single entity then we should go for Collection.
    2. Collection Inteface defines the most common methods which are applicable for any Collection object
    3. Note:- There is no concrete class which implements collection interface directly.
  2. List:
    1. List is child interface of Collection interface
    2. If we want to represent a group of individual objects as a single entity where duplicates are allowed and insertion order preserved then we should go for List.
  3. Set:
    1. It is child interface of Collection.
    2. If we don’t want duplicate and insertion order in not required then we should go for Set.
  4. SortedSet
    1. It is child interface of Set
    2. It doesn’t allow duplicate
    3. It inserts data in some sorted order.
  5. NavigaableSet
    1. It is child interface of SortedSet if defines several methods for navigations purpose
  6. Queue:
    1. It is child interface of Collection.
    2. If we want to represent a group of individual object prior to processing then we should go for queue.
  7. Map:
    1. Map is not the child interface of Collection
    2. If we want to store data in form of key-Value pair the should go for Map.
    3. Duplicates key are not allowed, but values can be duplicates
  8. SortedMap:-
    1. It is child interface of Map
    2. If we want to store data in sorting order of Key then this is good options
  9. NavigableMap
    1. It is child interface of sorted map
    2. It defines utility methods for navigation purpose.

Author: Shambhu Kumar

Hello, I am Author, decode to know more: In commodo magna nisl, ac porta turpis blandit quis. Lorem ipsum dolor sit amet, consectetur adipiscing elit. In commodo magna nisl, ac porta turpis blandit quis. Lorem ipsum dolor sit amet.

0 comments:

Recent Articles

© 2014 Learning Java. WP themonic converted by Bloggertheme9. Published By Gooyaabi Templates
TOP