❮ Previous Next ❯

JAVA Collection Introduction

  • In general Collection is a group of objects known as its elements. For example, collectionof books, collection of pens, etc.
  • Collection is an interface present in java.util.* package.
  • The general form of Collection is public interface Collection extends Iterable.
  • Some collections allow duplicate data items and some do not allow. Some are ordered and some are unordered.
  • The JDK does not provide any direct implementations of this interface, it provides implementations of more specific sub interfaces like List and Set.
  • Advantages:


    1. Containing homogeneous or heterogeneous data items.
    2. Size is not fixed. It is resizable or growable.
    3. Readymade methods are supported. So code complexity is reduced.

    Overall Collection came to the picture to eliminate all drawbacks of Array. In Array size
    is fixed but Collection is resizable, in array only homogeneous data items are allowed
    but Collection allowed homogeneous and heterogeneous data items, in array readymade
    methods are not supported but Collection supports readymade methods.
    ❮ Previous Next ❯



      Tutorials

    Popular Links

    Contact Us

    address Plot No-741,2ND Floor
    Opp. Bhagabati Temple,Jayadev Vihar
          Bhubaneswar-751013
          Email: info@silantechnology.com
          Phone: 0674-2361252
    address
    39877, sundale dr, apt#101, Fremont, California 94538, USA
           Phone: +1(262)388-7619

    facebook twitter google linked in

    © 2018 Silan Technology. All Rights Reserved