hashmap的put怎么用,我想输入张三,和99两个值。
hashmap的put怎么用,我想输入张三,和99两个值。
[解决办法]
如果张三和99当两个值,应该建立两个KEY对应这两个值
put("name","张三");
put("score",new Integer(99));
取得时:
hm.get("name");
hm.get("score");
发布时间: 2012-02-23 22:01:35 作者: rapoo
hashmap的put怎么用,我想输入张三,和99两个值。
hashmap的put怎么用,我想输入张三,和99两个值。
[解决办法]
如果张三和99当两个值,应该建立两个KEY对应这两个值
put("name","张三");
put("score",new Integer(99));
取得时:
hm.get("name");
hm.get("score");