求给分啊 急需技术分,求助攻!
package com.bi.Lc;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;
public class HashMapLc {
public static void main(String[] args) {
HashMap <String , Integer> hm1 = new HashMap<String , Integer>();
hm1.put("第一个",01);
HashMap<String , Integer> hm2 = new HashMap<String , Integer>();
hm2.put("第二个",02);
HashMap<HashMap<String , Integer>,String> hm = new HashMap<HashMap<String , Integer>,String>();
hm.put(hm1, "0001");
hm.put(hm2, "0002");
Iterator iter = hm.entrySet().iterator();
while(iter.hasNext()){
Map.Entry<String, Integer> entry = (Map.Entry<String, Integer>) iter.next();
Object key = entry.getKey();
Object val = entry.getValue();
System.out.println(key+"=========="+val);
}
}
}
|