The java.util Subpackages
Java
defines the following subpackages of java.util:
java.util.concurrent
java.util.concurrent.atomic
java.util.concurrent.locks
java.util.function
java.util.jar
java.util.logging
java.util.prefs
java.util.regex
java.util.spi
java.util.stream
java.util.zip
Each is
briefly examined here.
java.util.concurrent,
java.util.concurrent.atomic, and java.util.concurrent.locks
The java.util.concurrent package along with
its two subpackages, java.util.concurrent.atomic
and java.util.concurrent.locks,
support concurrent programming. These packages provide a high-performance
alternative to using Java’s built-in synchronization features when thread-safe
operation is required. Beginning with JDK 7, java.util.concurrent also provides the Fork/Join Framework. These
packages are examined in detail in Chapter 28.
java.util.function
The java.util.function
package defines several predefined functional interfaces that you can use when
creating lambda expressions or method references. They are also widely used throughout
the Java API. The functional interfaces defined by java.util.function are shown in Table 19-19 along with a synopsis
of their abstract methods. Be aware that some of these interfaces also define
default or static methods that supply additional functionality. You will want
to explore them fully on your own. (For a discussion of the use of functional
interfaces, see Chapter 15.)
java.util.jar
The java.util.jar package provides the
ability to read and write Java Archive (JAR) files.
java.util.logging
The java.util.logging package provides
support for program activity logs, which can be used to record program actions,
and to help find and debug problems.
java.util.prefs
The java.util.prefs package provides
support for user preferences. It is typically used to support program
configuration.
java.util.regex
The java.util.regex package provides
support for regular expression handling. It is described in detail in Chapter
30.
java.util.spi
The java.util.spi package provides support
for service providers.
java.util.stream
The java.util.stream package contains
Java’s stream API, which was added by JDK 8. A discussion of the stream API is
found in Chapter 29.
java.util.zip
The java.util.zip package
provides the ability to read and write files in the popular ZIP and GZIP
formats. Both ZIP and GZIP input and output streams are available.
Related Topics
Privacy Policy, Terms and Conditions, DMCA Policy and Compliant
Copyright © 2018-2023 BrainKart.com; All Rights Reserved. Developed by Therithal info, Chennai.