This week's book giveaway is in the OCAJP forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide 1Z0-808 and have Jeanne Boyarsky & Scott Selikoff on-line! See this thread for details.
HashMap implementation is not synchronized. Hashtable is. It really depends on the situation that you've to decide which is a better choice. But, being synchronized has a little trade-off in performance.
You could instead synchronize the method or code block that accesses the HashMap object instead.