Limits of Data types in Java | Core Java Tutorials
This Core Java Tutorials “Limits of Datatypes” post represents how to store data inside memory and what are the minimum and maximum values of data types.
- Every data type is having size and it is represented in bytes.
- One byte equals to 8 bits.
- Following diagram represents what are the minimum and maximum values can be stored into each data type depends on their size.
- The following table describes limits of each data type.
- Integer data type divided into 4 sub types.
- Depends on the data requirement, we use an integer type.
- Boolean data type doesn’t have size. It stores either true or false.
- true or false are keywords in java.