Documentation
The Java™ Tutorials
Download Ebooks
Download JDK
Search Java Tutorials
Hide TOC
Numbers and Strings
Numbers
The Numbers Classes
Formatting Numeric Print Output
Beyond Basic Arithmetic
Summary of Numbers
Questions and Exercises
Characters
Strings
Converting Between Numbers and Strings
Manipulating Characters in a String
Comparing Strings and Portions of Strings
The StringBuilder Class
Summary of Characters and Strings
Autoboxing and Unboxing
Questions and Exercises
Trail: Learning the Java Language
Lesson: Numbers and Strings
« Previous • Trail • Next »

# Numbers

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.

« Previous • Trail • Next »

Previous page: Numbers and Strings
Next page: The Numbers Classes