mirror of
https://github.com/corda/corda.git
synced 2024-12-29 09:18:58 +00:00
9bb3d6b972
git-subtree-dir: sgx-jvm/avian git-subtree-mainline:f978eab8d1
git-subtree-split:09e4fe60d0
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();
|
|
}
|
|
}
|