Example:
Say I want to create a Hashmap with 26 keys which will be 'A' through 'Z' for this example. Now let's say that I want keys 'A', 'M', and 'Z' to return the same integer value of 123. When this map is created, does the map get optimized such that only one value is stored in memory? Or does it still treat this as 3 different keys with 3 different values, even though the 3 values are the same.
I hope that question makes sense.
Thanks
intis 4 bytes, but how much space does anIntegerObject take up? After all you can't putints into aMap...