Use LinkedHashMap instead of HashMap
It will always return keys in same order (as insertion) when calling keySet()
For more detail, see Class LinkedHashMap
Use LinkedHashMap instead of HashMap
It will always return keys in same order (as insertion) when calling keySet()
For more detail, see Class LinkedHashMap