java.util Package
Overview
In this tutorial, we will learn about java.util Package. A Java package is a collection of related classes, interfaces, sub-packages, and other object-oriented types that are grouped together.
java.util Package
java.util provides the formatted printing and scanning, array utilities, Event model, Date & Time facilities, i18n(internationalization), the Java Collections Framework and other miscellaneous utility classes.
Java Collections Framework is a unified architecture for representing and manipulating collections in Java programs. A collection is a container that groups multiple elements or objects as a single element.
For example, a collection of ATM Cards.
Interfaces
Some of the interfaces in java.util package are as follows:
- Iterator<E>
- List<E>
- ListIterator<E>
- Map<K,V>
- Queue<E>
- Set<E>
- Observer
- EventListener
Classes
Some of the classes in java.util package are as follows:
- Date
- Calendar
- Currency
- ArrayList<E>
- AbstarctList<E>
- AbstarctMap<K,V>
- Scanner
- Random
- Timer
- TimeZone
- TreeSet<E>
- Vector
We can import the classes in the package using the import statement. For example, to import the Scanner class in the program, we can use the below import statement.
import java.util.Scanner;
Sub packages
Some of the sub packages in java.util package are as follows:
- concurrent
- function
- zip
- jar
- stream
—
Java Tutorials
Java Tutorial on this website:
https://www.testingdocs.com/java-tutorial/
For more information on Java, visit the official website :