DEV Community

Cover image for Java 8 Collection Framework: Introduction
Atharva Siddhabhatti
Atharva Siddhabhatti

Posted on

2

Java 8 Collection Framework: Introduction

Collection Framework is used to handle the group of objects of a program. The Collection Framework provides different implementation of interfaces such as LinkedList, HashSet, TreeSet. Also standard Array is also a part of this framework. Collection Framework also has one interface called as Iterator. The iterator is used to enumerate the content of a collection. Following are the List of Collection interface provided by the framework:-

  1. Array
  2. LinkedList
  3. HashSet
  4. TreeSet
  5. Map
  6. Deque
  7. List
  8. NavigableSet
  9. Queue
  10. Set
  11. SortedSet

These collection uses Comparator, RandomAccess, Iterator, ListIterator and Spliterator.

Compartor is used to compare two objects

The Iterators are used to enumerate the object within the collection

In addition to this there are optional methods, Optional methods are used to modify the content of the collection.

Collection is a generic interface

interface Collection

E is the type of object that particular collection can hold.

Methods in Collection interface:-

Collection Methods

In the next post we will see each of the Collection provided in the Framework with their examples.

Speedy emails, satisfied customers

Postmark Image

Are delayed transactional emails costing you user satisfaction? Postmark delivers your emails almost instantly, keeping your customers happy and connected.

Sign up

Top comments (0)

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay