java集合遍歷

一.map的使用 1.遍歷map中的鍵 Map<Integer, Integer> map = new HashMap<>(); for (Integer key : map.keySet()) { System.out.println("Key = " + key); } 2.遍歷map中的值 for (Integer value : map.values()) { System
相關文章
相關標籤/搜索