Created
January 30, 2018 19:14
-
-
Save srdo/cf57cdf45ae999005bfd410b14e33f9a to your computer and use it in GitHub Desktop.
This file contains 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
package com.mycompany.scratch; | |
public class NewClass2 { | |
public static class BrokenClass { | |
public static final BrokenClass instance = new BrokenClass(); | |
private BrokenClass() { | |
throw new RuntimeException("Broken"); | |
} | |
} | |
public static void main(String[] args) throws Exception { | |
try{ | |
BrokenClass c = BrokenClass.instance; | |
} catch (Error e) { | |
e.printStackTrace(); | |
} | |
BrokenClass c = BrokenClass.instance; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The output is