Memory Allocation of Primitive, Non-primitive Data Types
➲ In Java, all data type for primitive type variables is stored on the stack. ➲ For reference data types, the stack holds a pointer to the object on the heap. When setting a reference type variable equal to another…

