Run object finalization using System class : Garbage Collection « Language « Java Tutorial






public class Main {

  public static void main(String[] args) {
    System.runFinalization();
  }
}








1.8.Garbage Collection
1.8.1.Run object finalization using System class
1.8.2.Run the garbage collector using System class
1.8.3.The Lifetime of an Object