Created
September 29, 2012 13:58
-
-
Save mucar/3804073 to your computer and use it in GitHub Desktop.
deneme
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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