码迷,mamicode.com
首页 > 其他好文 > 详细

Map

时间:2017-03-22 22:31:02      阅读:128      评论:0      收藏:0      [点我收藏+]

标签:try   hash   string   hashmap   key   for   map   ash   system   

Map<Integer,String> map = new HashMap<Integer, String>();
map.put(1,"a");
map.put(2,"b");
map.put(3,"c");
map.put(4,"d");
map.put(5,"e");
for(Map.Entry<Integer, String> en : map.entrySet())
{
System.out.println("key="+en.getKey()+" value="+en.getValue());
}

Map

标签:try   hash   string   hashmap   key   for   map   ash   system   

原文地址:http://www.cnblogs.com/jcfxl/p/6602265.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!