Re: Difference between HashTable and HashMap
Tuesday, October 25, 2005 03:04 AM
Overall performance is best with the HashMap. The Hashtable is synchronized so performance is slightly worse. The performance of the Properties class is almost identitcal to the HashTable.
So it totally depends on the task which you are doing to select HashMap or HashTable. Suppose if ur task includes hitting the database with number of values everytime then its better to use HashMap instead of HashTable as the performance gets decreased worsely. If your task is getting the local entities or values from any other method or object, you can use HashTable as it is syncronized.