/media/sda-magnetic/david/Dokumente-15/fernuni-hagen/cs-i-ii/old-cs-2-03/java-new/2020-01-02/StaticTestProgSecond.java


public class StaticTestProgSecond {
    public static void main (String [] args) {
        Test tst1 = new Test (4, 5);
        Test tst2 = new Test (6, 3);
        Test tst3 = new Test (1, 4);
        Test tst4 = new Test (9, 8);
        
        tst1.printIJ ();
        tst2.printIJ ();
        tst3.printIJ ();
        tst4.printIJ ();
    }
    
    public static class Test {
        int i = 0;
        
        InnerTest x = null;
        
        Test (int i, int j) {
            this.i = i;
            this.x = new InnerTest (j);
        }
        
        public static class InnerTest {
            int j = 0;
            
            InnerTest (int j) {
                this.j = j;
            }
        }
        
        public void printIJ () {
            System.out.println (this.i);
            System.out.println (this.x.j);
        }
    }
}