corda/sgx-jvm/avian/test/Initializers.java
Andras Slemmer 9bb3d6b972 Add 'sgx-jvm/avian/' from commit '09e4fe60d01f4f4bfb6b2976973bb4913ef61edc'
git-subtree-dir: sgx-jvm/avian
git-subtree-mainline: f978eab8d1
git-subtree-split: 09e4fe60d0
2017-03-13 12:18:24 +00:00

25 lines
468 B
Java

public class Initializers {
private static class Static2 {
public static String foo = "Static2.foo";
static {
System.gc();
new Exception().printStackTrace();
}
}
private static class Static1 {
public static String foo = "Static1.foo";
static {
System.out.println(Static2.foo);
}
}
public static void main(String[] args) {
Object x = new Object();
System.out.println(Static1.foo);
x.toString();
}
}