public class RealGenerics<E extends SupprGenerics> extends SupprNonGenerics{
E t;
RealGenerics(E t){
this.t=t;
}
String Opeartion1(){
return t.Opeartion1();
}
String Opeartion2(){
return t.Opeartion1();
}
}
package GenericsDemo;
public class SupprGenerics {
private String String1 ;
private String string2;
String Opeartion1(){
return String1;
}
String Opeartion2(){
return string2;
}
}
package GenericsDemo;
public class SupprGenericsExtendLevel1 extends SupprGenerics{
private String String1 ;
private String string2;
String Opeartion11(){
return String1;
}
String Opeartion22(){
return string2;
}
}
package GenericsDemo;
public class SupprGenericsExtendLevel2 extends SupprGenericsExtendLevel1 {
private String String1;
private String string2;
private String string3;
String Opeartion111() {
return String1;
}
String Opeartion222() {
return string2;
}
String Opeartion333(RealGenerics<? super SupprGenericsExtendLevel2> a) {
return string3;
}
}
package GenericsDemo;
public class SupprNonGenerics {
private String String1 ;
private String string2;
String Opeartion11(){
return String1;
}
String Opeartion22(){
return string2;
}
}
No comments:
Post a Comment