Description
A chart descriping the primitve data types available in Java. It shows in columns (from left to right) the keyword, range, type, and a descriptive example. It is based on the information from the Java tutorials[1] and format from Algorithms, 4th Edition.[2] Java Codings
Detail
From left to right, top to bottom the text reads
Keyword, Range, Type, Example
byte, -128 to 127, 8-bit two's complement, Limited whole numbers
short, -32 768 to 32 767, 16-bit two's complement, Whole numbers
int, -2 to the 31st power to 2 to the 31st power - 1, 32-bit two's complement, Large whole numbers
long, -2 to the 63rd power to 2 to the 63rd power - 1, 64-bit two's complement, Very large whole numbers
float, See float, 32-bit IEEE 754 floating point, Decimals
double, See double, 64-bit IEEE 754 floating point, More precise decimals
boolean, true and false, 1-bit, not explicit, Conditions, flags
char, '\u0000' (0) to '\uffff' (65 535), 16-bit Unicode character, Letters, digits, symbols
References
- ↑ Oracle. "Primitive Data Types". Accessed 2014-10-23 14:35:08UTC
- ↑ Sedgewick, Robert and Wayne, Kevin Algorithms, 4th Edition. "Programming Model, Primitive data types and expressions".