title: How to store key value pairs in Java without using HashMap or any other collection?
body: <p>I want to be able to associate values to some keys without using collections. I am aware of HashMaps, but I am trying to explore a more basic way to do it.</p>
  
  <p>For example, if I was to count the frequency of each word in a file, I would take words as keys and frequency as values.</p>
  
  <p>Some languages allow accessing arrays using values as well . For example, Lua.</p>
  
  <p>I also want to be able to access every key with its value.</p>