This chapter 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.
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.
When working with numbers, most of the time you use the primitive types in your code. For example:
int i = 500; float ...