/media/sda-magnetic/david/Dok-15-2023-11-27/fernuni-hagen/cs-i-ii/old-cs-2-03/java-new/test-param-2020-11-16/TestParam02.java


public class TestParam02 {

    TestParam02 () {
        TestClass <String> tc = new TestClass <String> ("Hallo");
        System.out.println (tc.getTest());
        tc.setTest200 ("Welt");
        System.out.println (tc.getTest200());
    }
    public class TestClass <P> {
        P test;
        
        P getTest () {
            return this.test;
        }
        void setTest (P test) {
            this.test = test;
        }
        TestClass (P test) {
            this.test = test;
        }
        
        SubClass test200 = new SubClass ();
        
        void setTest200 (P xyz) {
            test200.settest (xyz);
        }
        
        P getTest200 () {
            return test200.gettest();
        }
        
        public class SubClass {
            P test2;
            void settest (P test2) { 
                this.test2 = test2;
            }
            P gettest () {
                return this.test2;
            }
        }
    }
    
}