标签:
//方法一: Integer[] arr= {1,2,3}; List<Integer> list = Arrays.asList(arr); if (list.contains(1)&&list.contains(2)){ System.out.println("1,2"); } //方法二: String[] arr = {"a","b","c"}; List<String> list = new ArrayList<String>(); Collections.addAll(list, arr); if (list.contains("a")&&list.contains("b")){ System.out.println("a,b"); }
标签:
原文地址:http://www.cnblogs.com/sflik/p/4490846.html