why we don't get order in HashMap.
I know it uses the hashcode but what differnce did it make to the order.
Here By order I mean elements that are added first to the HashMap should be added first I am not talking about sorting.
The implementation is based on a hash function, which is favorable for speed. Sorting/ordering is a different concern that limits the ability to make things work fast. HashMap favors speed. If you need to preserve order, use a SortedMap implementation.
Practice only makes habit, only perfect practice makes perfect.
Practice mindfully by doing the right things and doing things right.— Junilu