- import java.lang.reflect.Constructor;
- import java.lang.reflect.Method;
- import java.util.*;
- public class GenericTest {
- public static void main(String[] args)throws Exception {
- ArrayList collection1 = new ArrayList();
- collection1.add(1);
- collection1.add(1L);
- collection1.add("abc");
复制代码 |