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
What is loop in java?
Why singleton is not thread safe?
Why Set interface contains unique elements, what internally implemented for this so that it contains unique elements?
Is null a string in java?
What do you mean by order of precedence and associativity?
What is difference between module and function?
Define immutable object?
What is the difference between a constructor and a method?
What is array length in java?
What is Recursion Function?
What is stringbuffer in java?
What does the “static” keyword mean?
Is there a case when finally will not execute?
What is pre increment and post increment in java?
What is a finally block? Is there a case when finally will not execute?