S
studentoflife77
a little primitive question
I am looking to create a key-value pairs (map, table, etc) where the
key should be a primitive data type like int, long ,etc. My keys can
have high numbers
Hashmap, hashtable and all the other collections need Object as key
I can use array but because high key numbers it won't be memory
efficient
e.g: if i have a key of 10005 then the array has to be of the minimum
size 10005 so that i can store my value at array[10005] and later
access it directly
any thoughts?
Student
I am looking to create a key-value pairs (map, table, etc) where the
key should be a primitive data type like int, long ,etc. My keys can
have high numbers
Hashmap, hashtable and all the other collections need Object as key
I can use array but because high key numbers it won't be memory
efficient
e.g: if i have a key of 10005 then the array has to be of the minimum
size 10005 so that i can store my value at array[10005] and later
access it directly
any thoughts?
Student