带值的集合的创建
String[] a = {"1","2","3","4"}; boolean q = ArrayUtils.contains(a, "1"); System.out.println(q); //优雅的创建一个带值的list集合 List<String> strings = Arrays.asList("1", "2", "3"); //优雅的创建带值的map集合 HashMap<String, String> hashMap = new HashMap<String, String>() { { put("1","2"); put("2","2"); put("3","2"); } };