ArrayList<String> collection1=new ArrayList<String>();
ArrayList<Integer> collection2=new ArrayList<Integer>();
System.out.println(collection1.getClass()==collection2.getClass());//java虚拟机得到的是同一份字节码
//去类型化
collection2.getClass().getMethod("add", Object.class).invoke(collection2, "zhangzhao");
System.out.println(collection2.get(0));
结果:zhangzhao