@@ -561,9 +561,8 @@ Can be applied to Generic classes as well, e.g.
561561``` java
562562public class Box <T> {
563563 private T t;
564- ....
565564 }
566- ```
565+ ```
567566---
568567<sup ><sub >[ ▲ TOP] ( #table-of-contents ) </sub ></sup >
569568
@@ -807,7 +806,7 @@ Here's a detailed breakdown:
807806| Ordering | No ordering guarantee | Sorted by natural/comparator order | Maintains insertion order |
808807| Null keys/values | One null key, many null values | No null keys, null values allowed | One null key, many null values |
809808| Implementation | Array + Linked List / Tree bins | Red-Black Tree | Hash buckets + Doubly Linked List |
810- | Thread Safety | ❌ Not synchronized | ❌ Not synchronized | ❌ Not synchronized |
809+ | Thread Safety | ❌ Not synchronized | ❌ Not synchronized | ❌ Not synchronized |
811810| Fail-Fast? | Yes (not guaranteed in concurrency) | Yes (not guaranteed in concurrency) | Yes (same behavior) |
812811| Interfaces | Map | Map, SortedMap, NavigableMap | Map |
813812
@@ -828,9 +827,9 @@ Here's a detailed breakdown:
828827- Use Case: Range-based queries, maintaining sorted keys.
829828
830829✅ LinkedHashMap
831- - ** Best for: Preserving insertion order or implementing LRU cache.
832- - ** Behavior: Combines HashMap performance with predictable iteration order.
833- - ** Use Case: JSON serialization, access-order tracking.
830+ - Best for: Preserving insertion order or implementing LRU cache.
831+ - Behavior: Combines HashMap performance with predictable iteration order.
832+ - Use Case: JSON serialization, access-order tracking.
834833
835834---
836835
0 commit comments