In Java the default load factor is 0.75 and the default initial capacity of a hash map is 16.
The initial set of values for hashmap are as under :
DEFAULT_INITIAL_CAPACITY = 16;
DEFAULT_LOAD_FACTOR = 0.75;
THRESHOLD = DEFAULT_INITIAL_CAPACITY * DEFAULT_LOAD_FACTOR;
The hash map will automatically rehash the contents of the hash map into a new array with a larger capacity. This happens when the number of data in the hash map exceeds the THRESHOLD. Each resize leads to a doubled capacity 16*0.75, 32*0.75, 64*0.75.
In simple terms you should initialize it to something like
int capacity = (int) ((your_data)/0.75+1);
HashMap<String, Integer> myHashMap = new HashMap<String, Integer>(capacity);
In your case your_data = 64
Also, you can simply instantiate the default hashmap and it always resizes itself but it does not give as good performance as you initializing it properly.
You can read a previous post regarding the same
Best way to initialize a HashMap