title: How to see the distribution of keys in a HashMap?
body: <p>When using a hash map, it's important to evenly distribute the keys over the buckets.</p>
  
  <p>If all keys end up in the same bucket, you essentially end up with a list.</p>
  
  <p>Is there a way to "audit" a HashMap in Java in order to see how well the keys are distributed?</p>
  
  <p>I tried subtyping it and iterating <code>Entry&lt;K,V&gt;[] table</code>, but it's not visible.</p>