Other primitive types. Java’s int has 232 different values by design, so it can be represented
in a 32-bit machine word (many machines have 64-bit words nowadays, but the
32-bit int persists). Similarly, the double standard specifies a 64-bit representation.
These data-type sizes are adequate for typical applications that use integers and real
numbers. To provide flexibility, Java has five additional primitive data types:
■ 64-bit integers, with arithmetic operations ( long)
■ 16-bit integers, with arithmetic operations ( short)
■ 16-bit characters, with arithmetic operations (char)
■ 8-bit integers, with arithmetic operations ( byte)
■ 32-bit single-precision real numbers, again with arithmetic operations ( float)
We most often use int and double arithmetic operations in this book, so we do not
consider the others (which are very similar) in further detail here.