Both HashTable and HashMap implements Map interface but there are some differences between these two.It is one of the most popular questions asked in interview.So prepare well.
HashMap Vs HashTable
HashMap Vs HashTable
HashMap is not synchronized.hence It is better for non-threaded applications.
|
||
The iterator in HashMap is fail fast. | The enumeration in HashTable is not fail fast. |
Make sure you study this well.Happy Reading... :)