簡單判斷即將放入hashmap的值是否有重複 on April 30, 2012 Get link Facebook X Pinterest Email Other Apps public static void main(String[] args) { HashMap test = new HashMap(); test.put("hey", false); //如果有重複,會回傳true,無重複則為false System.out.println(test.containsKey("hey")); } Comments
Comments
Post a Comment