|Non-Synchronized. Fast.||Synchronized. Slow|
|Allows one null key and any number of null values.||Hashtable doesn’t allow null keys and null values.|
|Use LinkedHashMap to maintains the insertion order.
TreeMap to sort mappings based on the ascending order of keys.
|Hashtable doesn’t guarantee any kind of order.|
|Iterator in HashMap is fail-fast.||Enumerator in Hashtable is not fail-fast.|
Overview In this blog, we will cover a very common issue that causes the Infinity loop aka (Jackson JSON infinite recursion) when using @ManyToOne and @OneToMany relation between entities and how we can resolve them. Read more…