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.
Only the second one actually works, so there is no point in considering the first one. The documentation for the "get" method says:
"A return value of null does not necessarily indicate that the map contains no mapping for the key; it is also possible that the map explicitly maps the key to null. The containsKey method may be used to distinguish these two cases."
Joined: Sep 13, 2004
Thanks for point me to HashMap documentation.. I forgot that hash map allows null keys. But what if it is hash table..?