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