java.util Package in Java

Filed Under: Java

The java.util package is part of java.base module. This package contains the most important APIs and classes in Java.


Contents of java.util Package

Java util package contains the following classes and APIs:


Important Interfaces in java.util Package

Let’s look at some of the important interfaces in the java.util package.

  1. Collection: The root interface of the Collections API.
  2. Comparator: Used to implement sorting logic for the objects.
  3. Queue and Deque: Queue and Double ended Queue
  4. Iterator: implemented by the Collections classes to provide iteration logic.
  5. List
  6. ListIterator
  7. Map
  8. Set

Important Classes in java.util Package

  1. ArrayList
  2. Base64
  3. Calendar
  4. GregorianCalendar
  5. Date
  6. EnumMap
  7. EnumSet
  8. HashMap
  9. HashSet
  10. Hashtable
  11. LinkedList
  12. Optional
  13. PriorityQueue
  14. Properties
  15. ResourceBundle
  16. TreeMap
  17. TreeSet

Utility Classes in java.util Package

  1. Arrays
  2. Collections
  3. Formatter
  4. Scanner
  5. Random
  6. Timer, TimerTask
  7. UUID
  8. StringJoiner
  9. StringTokenizer

Exceptions in java.util Package

  1. ConcurrentModificationException
  2. EmptyStackException
  3. IllformedLocaleException
  4. InputMismatchException
  5. MissingResourceException
  6. NoSuchElementException
  7. PatternSyntaxException
  8. ZipException, JarException
  9. IllegalFormatException

References:

Leave a Reply

Your email address will not be published. Required fields are marked *

close
Generic selectors
Exact matches only
Search in title
Search in content
Search in posts
Search in pages