Wednesday, August 27, 2008

Garbage Collection in Java

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 and does not force the garbage collection but only suggests that the JVM may make an effort to do the Garbage Collection.

No comments:

private methods on Interface

  Private methods can be used on interface from java 9.   This will help in     Avoiding code duplication.     Ensuring code re-usab...