Arrays vs HashMap
807603Feb 28 2008 — edited Feb 28 2008I have a program that I'm writing that requires a very large array. This presents a problem b/c as my data input grows I will run out of heap space because of the large amount of contiguous memory I'm asking for in my array. I thought, why not use a hashmap mapping from integer to object. The hashmap could function like an array in that it would have nearly constant lookup and it wouldn't have contiguous memory so I could store more data. Is that true or am i crazy?