Skip to content

Commit c8f00f4

Browse files
Add files via upload
1 parent b0ece18 commit c8f00f4

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

SortedMap4.java

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
import java.util.TreeMap;
2+
import java.util.SortedMap;
3+
public class SortedMap4 {
4+
public static void main(String[] args) throws Exception {
5+
// lastKey
6+
SortedMap<String, Integer> map = new TreeMap<>();
7+
map.put("a", 1);
8+
map.put("b", 2);
9+
map.put("c", 3);
10+
System.out.println("Map:" + map);
11+
System.out.println("Last Key:" + map.lastKey());
12+
}
13+
}

0 commit comments

Comments
 (0)