package com.mjy.test; import com.mjy.map.Map; import com.mjy.map.TreeMap; /** * *************************************************** * @ClassName TreeMapTest * @Description 描述 * @Author maojianyun * @Date 2020/1/9 23:30 * @Version V1.0 * **************************************************** **/ public class TreeMapTest { public static void main(String[] args) { test1(); } static void test1() { Map<String, Integer> map = new TreeMap<String, Integer>(); map.put("c", 2); map.put("a", 5); map.put("b", 6); map.put("a", 8); map.put("a", 9); map.remove("b"); System.out.println(map.containsKey("b")); System.out.println(map.containsValue(2)); map.traversal(new Map.Visitor<String, Integer>() { public boolean visit(String key, Integer value) { System.out.println(key + "_" + value); return false; } }); } }

zarathurstra2020年11月6日
暂无贡献等级
xwq1234567 LV12020年10月28日
pxqtsht LV132020年7月3日
11111155255252020年6月28日
暂无贡献等级
17600446733 LV202020年6月23日
guadan2020年5月30日
暂无贡献等级
Jacko01 LV62020年5月18日
加油干阳神 LV52020年5月13日
seychell2020年3月22日
暂无贡献等级
bsszds2332020年3月10日
暂无贡献等级