private T var;
public void setVar(T var)
{
this.var=var;
}
public T getVar(){
return this.var;
}
public String toString(){
return this.var.toString();
}
}
public class Demo {
/**
* @param args
*/
public static void main(String[] args) {
// TODO Auto-generated method stub
Info<String> i = new Info<String>();
i.setVar("MLDN");
System.out.println(i);
}
}
class Info<T>{
private T var;
public void setVar(T var)
{
this.var=var;
}
public T getVar(){
return this.var;
}
/*public String toString(){
return this.var.toString();
}*/
}
public class Demo {
/**
* @param args
*/
public static void main(String[] args) {
// TODO Auto-generated method stub
Info<String> i = new Info<String>();
i.setVar("MLDN");
System.out.println(i);
}
}
private T var;
public void setVar(T var)
{
this.var=var;
}
public T getVar(){
return this.var;
}
/*public String toString(){
return this.var.toString();
}*/
}
public class Demo {
/**
* @param args
*/
public static void main(String[] args) {
// TODO Auto-generated method stub
Info<String> i = new Info<String>();
i.setVar("MLDN");
System.out.println(i.getVar());
}
}