We all are familiar with variables, in java variables represent a memory location that hold a value. During declaration of a variables, you are telling the compiler that what kind of value the variable can hold. For example a primitive type or a reference type. The following figure illustrate the difference between the both types.