I have a HashMap which is made up of parsed values from a textfile. Whenever I extract the contents from this HashMap, they come out in abc order. How do I keep the order that they were parsed, basically in a FIFO order.
Asked
Active
Viewed 27 times
2 Answers
1
HashMap
itself is not capable of preserving the order information. Have a look at other implementations, the standard library contains LinkedHashMap
for example.

Vojtech Kane
- 559
- 6
- 21