Types So Far
So far we have used four of the eight primitive Java data types.
int- integer data:1,-95,0char- character data:'a','9','!','\t'double- floating point data:3.14,0.0,-15.9997boolean- atrueorfalsevalue
In this chapter we will look at four more data types, and how Java stores them in memory.
byte- the smallest integer data type, with a very limited range of values.short- a smaller version ofint, with a smaller range of values.long- a larger version ofint, with a larger range of values.float- a smaller version ofdouble, with a smaller range of values.
primitive data type¶
A data type in Java that holds a simple data value, like a number or character. This is different than a reference, which holds the address of an object.