Thursday 29 June 2017

Java collection Framework

The Java Collections Framework is a collection of interfaces and classes which helps in storing and processing the data efficiently. This framework has several useful classes which have tons of useful functions which makes a programmer task super easy.



Let's explore one by one.


List:

A List is an ordered Collection (sometimes called a sequence). Lists may contain duplicate elements. It allows to have 1 or more null values. Elements can be inserted or accessed by their position in the list, using a zero-based index.
  • ArrayList
  • LinkedList
  • Vector

ArrayList:

ArrayList is a resizable-array implementation of the List interface. It implements all optional list operations, and permits all elements, including null.

Array lists are created with an initial size. When this size is exceeded, the collection is automatically enlarged. When objects are removed, the array may be shrunk.



Click here to know more about the ArrayList and it's methods and the use of each method..

LinkedList:

Java LinkedList class uses doubly linked list to store the elements. It provides a linked-list data structure. It inherits the AbstractList class and implements List and Deque interfaces.
Click here to know more about the ArrayList and it's methods and the use of each method..
Difference Between LinkedList and ArrayList:


Set Collection:

Set is a type of collection that does not allow duplicate elements. That means an element can only exist once in a Set. Only one null value allowed in Set. 
Set is an Interface which extends Collections interface. 


Follow post HashSet, Treeset & LinkedHashSet to know more about the Set collection and it's implementations and the use of each of it's methods..

Map Collection:

A Map is an object that maps keys to values, or is a collection of Key-Value pairs.
Image result for java map key value pair

To know more about Map Collection follow post Map Collection.

11 comments:

  1. Thanks for sharing,this blog makes me to learn new thinks.
    interesting to read and understand.keep updating it.
    call girls in dehradun
    escort service in dehradun

    ReplyDelete

  2. Thanks for sharing,this blog makes me to learn new thinks.
    interesting to read and understand.keep updating it.
    call girls in ghaziabad
    escort service in ghaziabad

    ReplyDelete
  3. Cryptocurrency App Development Company is a subset of digital currency designed to serve as an exchange mechanism for secure online transactions via cryptography. Bitcoin is the world's first decentralized record currency. It has been a huge success, with a good response from the global community. It has prepared the path for the emergence of new cryptocurrencies. These digital currencies are also known as Bitcoin forks.

    ReplyDelete
  4. ajj kal larkiyo me kaafi josh ki kamiya payi jaati hai wo apne partner ke sath bhut jaldi josh khatam kar leti hai jiske wajah se uska partner usse khus nahi ho paata hai or unki relationship kaafi kamjoor hone lagti hain
    ladkiyo ki josh badhane ke liye dawa ka naam
    so larkiya agar aaplog vi aisa problem face karrhi ho to aap is site pe jake information le sakte hai or aise problem se chutkara pa sakte hai

    ReplyDelete
  5. A Dedicated Server is a physical server that's assigned to a single organization.

    ReplyDelete
  6. Discover unparalleled reliability and performance at our Data Center in Mumbai. Experience seamless connectivity and robust security solutions.

    ReplyDelete