That is very dumb . A useless limitation , yes . Very dumb , I don ' t think so . I ' ve seen way worse . Keep in mind this API is more than 20 years old and has never been broken , along with all its siblings . So there ' s that , it ' s limited but trustable . If you had to handle more than 2 billion objects in Java or any language for that matter , you ' d also be better off by not use the standard library data structure , which are optimized for the general case , which might cover up to a few million items . beyond that , you ' d choose a structure appropriate for your application domain , HPC , storage , reporting . Also , keep in mind that anything that implements . size in Java will have it ' s own structure and the objects it holds allocated individually on the heap , which will likely represent at least 16 bytes per object with references and structure overhead , which would take at least 2 Bx 16 b 32 GB in RAM . I don ' t even have have half of that on my workstation , and I have an OS to run . So all in all , that int isn ' t worth getting upset with . edit a letter another thought