Java Object.finalize()
Syntax
Object.finalize() has the following syntax.
protected void finalize() throws Throwable
Example
In the following code shows how to use Object.finalize() method.
/*from w w w . ja v a 2 s . c om*/
public class Main {
public static void main(String[] args) throws Throwable {
Main cal = new Main();
cal.finalize();
}
}