Which option is better to use:
And why?
And what is loadfactor and modcount in the HashMap property?
When I debug my code in eclipse and look at the HashMap value, it shows a property named loadfactor with a value of 0.75 and a property called modcount with a value of 3.
Where I use hashmap in my code:
I am developing a communication application that you can say chat application. in which I store all sent / received messages in the HashMap. Now that I can’t guess how many messages will be sent / received by the user, I declare a hash map without initial capacity. What I wrote
Map<String, Map<String, List<String>>> usersMessagesMap = new HashMap<String, Map<String,List<String>>>();
if I use it with an initial capacity of 100 or higher, will it work with code?
source share