mirror of
https://github.com/corda/corda.git
synced 2025-01-27 22:59:54 +00:00
9bb3d6b972
git-subtree-dir: sgx-jvm/avian git-subtree-mainline: f978eab8d134c88f88ff67e49458a771c32351db git-subtree-split: 09e4fe60d01f4f4bfb6b2976973bb4913ef61edc
25 lines
468 B
Java
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();
|
|
}
|
|
}
|