日期:2014-05-20  浏览次数:20710 次

hashmap的put怎么用,我想输入张三,和99两个值。
hashmap的put怎么用,我想输入张三,和99两个值。

------解决方案--------------------
如果张三和99当两个值,应该建立两个KEY对应这两个值
put("name","张三");
put("score",new Integer(99));

取得时:
hm.get("name");
hm.get("score");