Steve Fahlbusch wrote:when using java, there is no specification as to how many bits (bytes) a type utilizes.
JLS 4.2 Primitive Types and Values:
The integral types are byte, short, int, and long, whose values are 8-bit, 16-bit, 32-bit and 64-bit signed two's-complement integers, respectively, and char, whose values are 16-bit unsigned integers representing UTF-16 code units
JLS 4.2.3 Floating Point Types, Formats, and Values:
The floating-point types are float and double, which are conceptually associated with the single-precision 32-bit and double-precision 64-bit format IEEE 754 values and operations as specified in IEEE Standard for Binary Floating-Point Arithmetic, ANSI/IEEE Standard 754-1985 (IEEE, New York).
Although the physical size in a given JVM implementation may be larger than the sizes mentioned above, the various types must occupy at least as many bits or bytes as indicated. More to the point, though, the types must
behave as though they were of those sizes, and that directly drives the OP's question.