I have many records in to fetch and it could be in millions, I want to use hashmap, but I am not sure if that is ok or what would be the memory implications.
Please suggest
Thanks VIvek
I have many records in to fetch and it could be in millions, I want to use hashmap, but I am not sure if that is ok or what would be the memory implications.
Please suggest
Thanks VIvek
Welcome to StackExchange. A good place to start would be taking a look at this question:
Difference between HashMap, LinkedHashMap, and SortedMap in Java
HashMap
is generally discouraged if you need to grab items in a specific order.
If you need to store 1,000,000+ records, you may want to look into an external database to store the information, as it will be memory consuming to hold all of the records.