第二阶段27泛型_泛型类
public class Generic<T> { private T flag; public void setFlag(T flag){ this.flag = flag; } public T getFlag(){ return this.flag; } } public class Test1 { public static void main(String[]args){ Generic<String>generic = new Generic<>(); generic.setFlag("abcdef"); String flag = generic.getFlag(); System.out.println(flag); } }