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

Does A Class Inherit The Constructors Of Its Superclass?

538


can java object be locked down for exclusive use by a given thread? Or what happens when a thread cannot acquire a lock on an object? : Java thread

539


What is anagram number?

458


Can list contain null in java?

629


What is type safety in java?

491






Is finalize() similar to a destructor?

554


Write a code to show a static variable?

619


Why do we use bufferedreader?

542


Is 0 true or false in java?

520


What is parsing a string?

592


Can you achieve runtime polymorphism by data members?

592


What is an interface in java? Explain

579


Why synchronization is important in java?

568


Does java support multiple inheritance or not?

605


What is the instance of an object?

558