By bloid
via jroller.com
Published: Sep 11 2008 / 09:46
The Hashtable class has a constructor to which you can provide an initial capacity. This can be useful when you know beforehand how many objects you will put in, and do not want the container to resize. This trick is used often for other containers such as ArrayList. However, with Hashtable, it is not as straightforward as for other containers. The proof is those lines of code a former colleague sent me:
Add your comment