what is the difference between HashMap and Hashtable

Answer Posted / green

HashTable is a Legacy Class,where as HashMap is not.
HashTable is Syncronized,where as HashMap is not.
HashTable does not allow any null keys nad values, HashMap
allows one null key and 'n' number null values.
comparatively HashMap is faster then HashTable

Is This Answer Correct ?    3 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the epoch date?

742


What is array pointers ?

807


What are the common uses of "this" keyword in java ?

786


What is difference between fail-fast and fail-safe?

860


How we can run a jar file through command prompt in java?

727


Which sort is best in java?

740


Why do we need singleton class?

738


What is the difference between a factory and abstract factory pattern?

895


Which way a developer should use for creating thread, i.e. Sub classing thread or implementing runnable.

713


Is set sorted in java?

702


java program with complete 4 oops concepts implemented example

2926


I want to store more than 10 objects in a remote server? Which methodology will follow?

2882


What ide should I use for java?

728


Which is bigger double or float?

731


Is java pass by value or pass by reference?

751