What is Garbage Collection and how to call it explicitly?
When an object is no longer referred to by any variable, java automatically reclaims memory used by that object. This is known as garbage collection. System. gc() method may be used to call it explicitly. In Java, garbage collection is a process by which the Java Virtual Machine (JVM) automatically manages memory by reclaiming the … Read more