标签:print nbsp port pac stat div code .so sys
package ditu.com; import java.util.Map.Entry; import java.util.Set; import java.util.SortedMap; import java.util.TreeMap; public class TestTreeMap { public static void main(String[] args) { TreeMap<Integer,String> map=new TreeMap<Integer,String>(); map.put(1, "andy"); map.put(2, "bill"); map.put(3, "cinaa"); map.put(4, "davaid"); map.put(6, "ella"); SortedMap<Integer, String> m=map.subMap(3, 10); //Set <Entry<Integer,String>>set=map.subMap(2, 6).entrySet(); Set <Entry<Integer,String>>set=m.entrySet(); for(Entry<Integer,String> e:set){ System.out.println(e); } } }
标签:print nbsp port pac stat div code .so sys
原文地址:http://www.cnblogs.com/zyy1130/p/6832177.html