Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
  • Collections in Java

    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 210
    Comment on it

    Collection in java can be called as a container, or an object which binds multiple elements into a single unit. Collections in java is a framework used to store, and manipulate group of elements. They represent data items that form a group on which operations such as searching, sorting, insertion, manipulation, deletion etc can be performed to manipulate data.

    Collections Framework has:

    1. Interfaces and its implementations i.e. classes
    2. Algorithm

    The Hierarchy of the Collection Framework

    1. Iterate
    2. Collection
    3. List

    (i) ArrayList,
    (II) Vector,
    (III) LinkedList,
    (Iv) PriorityQueue,
    (v) HashSet,
    (vi) LinkedHashSet,
    (vii) TreeSet etc

    4.Queue

    (i) List,
    (ii) Queue,
    (iii)Deque

    5. Sets

    (i)HashSet
    (ii)LinkedHashSet
    (iii)SortedSet
    (iv)TreeSet

    There are methods of Collection interface

    1. public boolean add(Object element),
    2. public boolean addAll(collection c),
    3. public boolean remove(Object element),
    4. public boolean removeAll(Collection c),
    5. public boolean retainAll(Collection c) etc

    But only three methods are there for Iterator interface.

    1. public boolean hasNext().
    2. public object next().
    3. public void remove().

 0 Comment(s)

Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: