Home > DeveloperSection > Interviews > What does System.gc() and Runtime.gc() methods do ?

Posted on    January-14-2015 10:26 PM

 Java Java 
Ratings:
 1 Answer(s)
  460  View(s)
Rate this:

Kamlakar Singh
Kamlakar Singh

Total Post:80

Points:400
Posted on    January-14-2015 11:26 PM

These methods can be used as a hint to the JVM, in order to start a garbage collection. However, this it is up to the Java Virtual Machine (JVM) to start the garbage collection immediately or later in time.

Don't want to miss updates? Please click the below button!

Follow MindStick