title: Large HashMap in java can be stored?
body: <p>I know hashmaps are a great way to store keys and their values. Lets say I want to store the count of millions of words, or for concreteness lets say I have a file of 512 GB and my hashmap can in the worse case be 512 GB (String, Integer).</p>
  
  <p>If I have a RAM of 8GB, can I store all of the hashmap on my computer? Assuming I have secondary storage of 1 TB?</p>
  
  <p>Can anyone explain why?</p>