Maps (collection) that maintains insertion Order in java Maps (collection) that maintains insertion Order in java android android

Maps (collection) that maintains insertion Order in java


You should use LinkedHashMap for this purpose..Visit Android Docs and Java Docs for more details.


A LinkedHashMap will keep the data in the same order as it has been inserted.