Java Reference
In-Depth Information
classes in the java.math package
The java.math package provides classes supporting multi-precision arithmetic, such as BigDecimal
and BigInteger . These classes come in helpful in cases where rounding errors, which can occur
when working with normal float or double types, are unacceptable, e.g., in financial and scientific
applications.
Contrary to what logical thinking would imply, the main Math class is found in java.lang and not
in java.math (and is also not duplicated there).
classes in the java.net, java.rmi, javax.rmi, and org.omg.
corBa packages
The classes contained in java.net allow functionality for networking, talking to web servers,
and other transactions. java.rmi and javax.rmi contain classes dealing with Remote Method
Invocation (RMI), the object‐oriented counterpart of RPC (Remote Procedure Calls). The org.omg.
CORBA package provides a number of complex classes supporting remote communication between
applications using the CORBA RMI protocol, but is not widely used anymore.
The keyword to remember here is “communication.” Providing an in‐depth discussion on net-
work programming is out of scope for this topic, but you will see in Chapter 10 how to access web
sources with Java, where these packages and their classes show up again.
classes in the java.awt and javax.swing packages
The classes contained in java.awt (Abstract Window Toolkit) provide access to a basic set of GUI
(graphical user interface) widgets, as well as classes to provide support for clipboard operations
(copying and pasting) and input devices (mice, keyboards, and the like). Swing java.swing —pro-
vides a collection of classes that builds on top of the Abstract Window Toolkit to extend GUI sup-
port with more advanced routines.
You will learn about building graphical user interfaces in Java in Chapter 11, where these packages
and their classes are covered in full.
Note that Java 8 also introduces a large update for the so‐called JavaFX technology. JavaFX
describes a series of packages aiming to bring rich, graphical applications to a number of devices
and web browsers, and is intended to replace Swing in the future, although both Swing and
JavaFX will remain in the JRE for some time. Main features of JavaFX include support for mod-
ern 3D graphics and web technologies. On the other hand, building applications with JavaFX
has a steeper learning curve than Swing, so the latter remains the preferred option in most cases
for beginners, and for the development of applications that do not require advanced graphical
capabilities.
classes in the java.util package
The java.util built‐in classes in Java contain a large number of classes to deal with various data struc-
tures. You will heavily utilize these classes throughout the rest of the topic, and as they will no doubt be
the built‐in classes in Java SE you will use the most, it makes sense to discuss them in more detail.
 
Search WWH ::




Custom Search