What is the difference between a primitive type and a reference type?
Answer 2
Primitive type
The actual value is stored in the memory space.
Primitive types have a size in the type itself.
Therefore, the int type does not have the size of one digit to represent one digit.
For example, in the case of int type, the actual expression is as follows.
For integer value 10
00000000000000000000000000001010
Simply put, the size (= number of bits) of a primitive type is determined by the type.
It means that.
Reference type
Rather than storing the actual value in memory space
The address value where the value is stored is stored.