Skip to content

Instantly share code, notes, and snippets.

@mucar
Created September 29, 2012 13:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mucar/3804073 to your computer and use it in GitHub Desktop.
Save mucar/3804073 to your computer and use it in GitHub Desktop.
deneme
public class FinalizerTest {
public FinalizerTest() {
System.out.println("constructed");
throw new RuntimeException();
}
protected void finalize() throws Throwable {
System.out.println("finalized");
}
public static void main(String[] args) {
try {
new FinalizerTest();
} catch (Exception e) {
System.out.println("exception");
}
System.gc();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment