Link Details

Link 112275 thumbnail
User 111696 avatar

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:
  • 6
  • 1
  • 1016
  • 231

Add your comment


Html tags not supported. Reply is editable for 5 minutes. Use [code lang="java|ruby|sql|css|xml"][/code] to post code snippets.

Voters For This Link (6)



Voters Against This Link (1)