In my class I create about 10 different Maps. I thought of initializing the size. But I also thought is there going to be an advantage in doing so.
Approach1:
Map<String,String> myMap = new HashMap<String, String>(5);
Approch2:
Map<String,String> myMap = new HashMap<String, String>();
Per Approach2, the default capacity is 16. But will the memory allocation is more for approach2 compare to approach1?