Java Number Cruncher: The Java Programmer's Guide to Numerical Computing By Ronald Mak
Table of Contents
Part I. Why Good Computations Go Bad
Compared with what we saw of the floating-point types in Chapter 1, the integer types must seem pretty tame and safe! We'll see how valid that assumption is in this chapter.
Java has five integer types named by the keywords byte, short, char, int, and long. The values of these types represent the whole numbers of pure mathematics, which we use for counting and for doing arithmetic that doesn't involve fractions. We must use the word represent because Java's integers, unlike the whole numbers, are not infinite.