JAVA集合Map

一、Map集合的概述 二、常用API //創建HashMap的對象 HashMap map = new HashMap(); /*V put(K key, V value) 在此映射中關聯指定值與指定鍵,添加元素進去 */ //null值也可作爲鍵值 map.put(null, "123"); map.put(1, "456"); map.put(2, "789");
相關文章
相關標籤/搜索