Skip to content

Commit ac63334

Browse files
Update SortedMapDemo.java
1 parent 36315f3 commit ac63334

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

src/learnCollections/SortedMapDemo.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,9 @@
44
import java.util.TreeMap;
55

66
/*
7-
SortedMap is an Interface that extends Map and guarantees that the entries are sorted based on the keys, either in their natural ordering or by a specified Comparator.
7+
SortedMap is an Interface that extends Map and guarantees that the entries are sorted based on the keys, either in their natural ordering or by a specified Comparator.
8+
9+
HashMap uses an array of buckets with linked lists / trees, while TreeMap is implemented as a self-balancing Red-Black Tree without any bucket array
810
*/
911

1012
public class SortedMapDemo {

0 commit comments

Comments
 (0)