Same thing here: do you expect duplicate keys? If not, just use an array or ArrayList which consume less memory.