interface Info<T>{
public T getvar();
}
class Infodemo implements Info<String>{
private String var;
public Infodemo(String var){
this.var = var;
}
public void setVar(String var){
this.var = var;
}
@Override
public String getvar() {
// TODO Auto-generated method stub
return this.var;
}
}
public class Pet{
public static void main(String args[]){
Info<String> var = new Infodemo("李兴华");
System.out.println("内容:"+var.getvar());
}
}