System.runFinalizersOnExit(boolean value) has the following syntax.
@Deprecated public static void runFinalizersOnExit(boolean value)
In the following code shows how to use System.runFinalizersOnExit(boolean value) method.
public class Main { public static void main(String[] args) throws Exception { System.runFinalizersOnExit(true); } }