Arrays.asList 方法

使用工具类Arrays.asList()把数组转换成集合

String[] str = new String[]{"1","2"};
List list = Arrays.asList(str);

你可能感兴趣的:(Arrays.asList 方法)