Course Content
Core Java
About Lesson

It contains the collections framework, legacy collection classes, event model, date and time facilities, internationalization, and miscellaneous utility classes (a string tokenizer, a random-number generator, and a bit array).

Important Components of java.util Package

Collections Framework

  • Interfaces: Core interfaces of the collections framework include Collection, List, Set, Map, Queue, and Deque.
  • Classes: Concrete implementations of these interfaces, such as ArrayList, LinkedList, HashSet, TreeSet, HashMap, TreeMap, PriorityQueue, and ArrayDeque.
  • Utility Classes: Collections class provides static methods for sorting, searching, reversing, and other operations on collections.

Date and Time Utilities

  • Date: Represents a specific instant in time, with millisecond precision.
  • Calendar: Provides methods for manipulating dates and times in a more flexible manner than Date.
  • TimeZone: Represents a time zone offset, and also handles daylight saving adjustments.
  • GregorianCalendar: A concrete subclass of Calendar, used for date and time calculations.

Event Handling

  1. EventObject: The root class for all event state objects.
  2. EventListener: A tagging interface for event listener classes.

Miscellaneous Utilities

  1. Random: Generates pseudo-random numbers.
  2. Scanner: Parses primitive types and strings using regular expressions.
  3. Properties: A subclass of Hashtable used to maintain lists of values in which the key is a String and the value is also a String.

Scroll to Top