title: Java HashMap size allocated
body: <p>Java Hash Map has a size() method, 
  which reflects how many elements are set int the Hash Map.
  I am interested to know what is the actual size of the Hash Map.
  I tried different methods but can't find the correct one.
  I set the initial Capacity to 16</p>
  
  <pre><code>HashMap hm = new HashMap(16);
      for(int i=0;i&lt;100;++i){
          System.out.println(hm.size());
          UUID uuid = UUID.randomUUID();
          hm.pet(uuid ,null);
  
      }
  </code></pre>
  
  <p>when i will add values this size can increase, how can i check the size that is actually allocated?</p>