This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
the bad news is,that in a Hashtable you can store one value per one key only. If you for example put in a value under a same key which was already used, that former key-value-pair will be overwritten by the newly made input.
The good news is, that you do store Objects in Hashtables. So for example, you coud put in this:
If you need to get back your many things, you just call:
(Don't forget, you always have to cast back your objects to their previous shape.)
An other very cool thing with Hashtables (and their related collection classes) is that you can store in them even whole other classes, interfaces etc. This can be very powerful.