JVM (part 3) ~ DataTypes of JVM
Chapter 3
DataTypes
Datatypes are specify the sizes and the values that can be stored in a variable.
They are divided into two categories like Primitive Type and Reference Type. primitive type holding the value of the data and reference types always hold the reference.

Primitive Type
Primitive type is one that can be characterized as a basic structure for building more complex data types. when we talk about boolean in jvm it always represent by either int and byte boolean false is represent as a zero and boolean true is represent as a non zero. but if it is a operatable boolean it represent the Int value and if it is a array of boolean it represent as array of bit value.
Size of DataTypes
when we talk about size of these data types all the data types size are same in the every environment. but when we look into the long datatype it has a special difference from others it always takes 64 bit two’s compliment as it size. it’s same in the every environment / implementation.
and there has a another one called return address type it can’t access by the developers because it specific for the JVM it is not in the language. JVM use this for implement the final block.
Reference Type
In this section there had 3 components as we take class it is always reference to instance of the class. and the interface is reference to implementation class instance of this particular interface. array types always reference to arrays.
There was a another Reference type called NULL and it is not specific type which not reference to anywhere
- There was a keyword called Word Size it is just a base so we need to add values to explain the word size
JVM implementation always talk about the word size and length of the word size is deside by particular implementation.
Rules of define the length of word size
01. Word should be able to hold any primitive data type
02. Two words should be able to carry long or double value
NOTE : according to this rule at least word need length of 32 bit