What does import Java.util.* in Java do?


Java util package contains collection framework, collection classes, classes related to date and time, event model, internationalization, and miscellaneous utility classes. On importing this package, you can access all these classes and methods.

Following table lists out the classes in the collection package.

Interfaces
Description
Classes
Collection
Collection Interface represents a group of objects. It is a root interface of collection framework.
  1. Abstract Collection
Set
It is a dynamic group of unique elements. It does not store duplicate element.
  1. HashSet
  2. LinkedHashSet
List
They are similar to sets with the only difference that they allow duplicate values in them.
  1. Stack
  2. vector
  3. ArrayList
  4. LinkedList
Queue
It is an arrangement of the type First-In-First-Out (FIFO).
First element put in the queue is the first element taken out from it.
  1. LinkedList
Map
It stores elements in the form of unique Key-Value pair.
  1. HashMap
  2. Hashtable

Updated on: 30-Jul-2019

7K+ Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements