Skip to content

Commit 3a754cd

Browse files
Add files via upload
1 parent 550b289 commit 3a754cd

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

TreeMap.java

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,15 @@ public static void main(String[] args) throws Exception {
3333

3434
// Unsopported Operation Exception
3535
Map.Entry<Integer, String> f = tree_map.firstEntry();
36-
f.setValue("My Value");
3736
System.out.println("First Entry: " + f);
37+
Map.Entry<Integer, String> f1 = tree_map.lastEntry();
38+
System.out.println("Last Entry: " + f1);
39+
System.out.println(" " );
40+
f.setValue("My Value");
41+
System.out.println("After Change First Entry: " + f);
42+
43+
f.setValue("My Value");
44+
System.out.println("After Change Last Entry: " + f1);
3845

3946
}
4047

0 commit comments

Comments
 (0)