Map,可用常规的for遍历

    Map<String, String> bmarks = new HashMap<>();
    for (Map.Entry<String, String> entry: bmarks.entrySet()) {
        System.out.println(entry.getKey() + " : " + entry.getValue());
    }

其他遍历方式,参考:http://blog.csdn.net/tjcyjd/article/details/11111401

posted on 2017-05-07 20:05  蛋尼  阅读(132)  评论(0编辑  收藏  举报