What is the difference between HashMap, LinkedHashMap and TreeMap in Java? I don\'t see any difference in the output as all the three
HashMap
LinkedHashMap
TreeMap
These are different implementations of the same interface. Each implementation has some advantages and some disadvantages (fast insert, slow search) or vice versa.
For details look at the javadoc of TreeMap, HashMap, LinkedHashMap.