Q.4. What is the difference between primitive data types and reference data types in Java?
In Java primitive data type store the actual value directly , while reference data type store a memory address that points to where the actual data is located .The size of the primitive variable is fixed whereas the size of reference variable is dynamic