* tests/gc/ClassInit: Testcase for static class initializers works correct now.
[cacao.git] / tests / gc / ClassInit.java
1 class ClassInitTest {
2         static {
3                 System.out.println("Static Initializer will call the GC ...");
4                 System.gc();
5         }
6
7         public static void test() {
8                 System.out.println("Static method fine.");
9         }
10 }
11
12 public class ClassInit {
13         public static void main(String[] s) {
14                 String t;
15
16                 System.out.println("Preparing a String ...");
17                 t = new String("Remember Me!");
18
19                 System.out.println("Static Test Method will be called ...");
20                 ClassInitTest.test();
21
22                 System.out.println("String: " + t);
23                 System.out.println("Test fine.");
24         }
25 }