Category Archives: Java

Shallow Copy Vs Deep Copy

Shallow Copy A shallow copy is a type of copy made by cloning or copying the original object, but it does not contain copies of objects nested within the original object. Instead, it creates a new copy that references the same nested objects as the original object. Let’s understand with the following diagram: As we… Read More »

Java Memory Management: Ultimate Guide for Performance and Optimization

Java Memory management in Java refers to the process of handling computer memory (RAM) effectively and efficiently to store and manage objects created during the execution of a Java program. It involves allocating memory to new objects when they are created and freeing up memory from objects that are no longer needed (garbage collection) to… Read More »