JAVA Data Types



A Venn Diagram of all JAVA data tpyes. Note that this is not a diagram of their values, just their categories.




A table for all of the different data types in JAVA. Keep in mind that some categories are more appropriate for only some data types.

Data Type Content Default Value* Minimum Value Maximum Vlue Memory Space (bytes)
byte integer 0 -128 127 1
short integer 0 -32768 32767 2
int integer 0 -2147483648 2147483647 4
long integer 0 -9223372036854775808 9223372036854775807 8
float decimal 0 . 0 -3.40282347 x 10^38 3.40282347 x 10^38 4
double decimal 0 . 0 -1.79769313486231570 x 10^308 1.79769313486231570 x 10^308 8
char single characters '' (empty) not applicable not applicable 1
boolean true or false false not applicable not applicable 1/8 (1 bit)
object reference Objects or null null not applicable not applicable varies
*note: not all local varibales are not given default values