Java examples for Java Virtual Machine:Utility
Run object finalization using System class
public class Main { public static void main(String[] args) { System.out.println("Suggesting JVM to run finalize method"); System.runFinalization(); System.out.println("Suggested JVM to run finalize method"); /* w ww .j ava 2 s . co m*/ } }