标签:put pre == integer list color 方法 arraylist string
用KeySet()方法;
Map<Integer, String> map = new HashMap<Integer, String>(); map.put(01, "a"); map.put(02, "b"); map.put(03, "c"); map.put(04, "d"); Set set = map.keySet(); ArrayList<Integer> list = new ArrayList<Integer>(set); for (int i = 0; i < list.size(); i++) { int s = list.get(i); System.out.println(s); Object o = map.get(s); System.out.println(o); System.out.println("==");
标签:put pre == integer list color 方法 arraylist string
原文地址:https://www.cnblogs.com/wzs9/p/9649096.html