public class Generics '<'E'> '{//去掉前面的单引号
private E e;
public E getE() {
return e;
}
public void setE(E e) {
this.e = e;
}
public static void main(String[] args) {
Generics d = new Generics();
d.setE(new String("叶苏写的博文"));
System.out.println("该字符串值为:"+d.getE());
}
}