/media/sda-magnetic/david/Extern-Magnetic-2022-06-29/Extern01/Dokumente-2020-11-16/disk10-ab-2020-01-10/02-debian-pc2-work/informatik/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;
            }
        }
    }
    
}