We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 70d5cd5 commit 0462dfaCopy full SHA for 0462dfa
SortedMap6.java
@@ -0,0 +1,17 @@
1
+import java.util.TreeMap;
2
+import java.util.SortedMap;
3
+public class SortedMap6 {
4
+ public static void main(String[] args) throws Exception {
5
+ // tailMap
6
+ SortedMap<String, Integer> map = new TreeMap<>();
7
+ map.put("a", 1);
8
+ map.put("b", 2);
9
+ map.put("c", 3);
10
+ map.put("d", 4);
11
+ map.put("e", 5);
12
+ map.put("f", 6);
13
+ System.out.println("Map:" + map);
14
+ System.out.println("Head Map:" + map.tailMap("e"));
15
+
16
+ }
17
+}
0 commit comments