The Java Tutorials have been written for JDK 8. Examples and practices described in this page don't take advantage of improvements introduced in later releases and might use technology no longer available.
See Java Language Changes for a summary of updated language features in Java SE 9 and subsequent releases.
See JDK Release Notes for information about new features, enhancements, and removed or deprecated options for all JDK releases.
This section begins with a discussion of the
Number
class in the java.lang
package, its subclasses, and the situations where you would use instantiations of these classes rather than the primitive number types.
This section also presents the
PrintStream
and
DecimalFormat
classes, which provide methods for writing formatted numerical output.
Finally, the
Math
class in java.lang
is discussed. It contains mathematical functions to complement the operators built into the language. This class has methods for the trigonometric functions, exponential functions, and so forth.