what is the difference between HashMap and Hashtable
Answer Posted / brijendra kumar soni(xavient)
1-Hashmap is nonSyncronized whereas Hastable is Syncronized.
2-Hashmap allows both key and values are Null whereas
Hastable doesnot allow Null values.
3-Hasmap belongs to Collection package whereas Hashtable is
a class.
4-The class Hashmap implements the map interface whereas
Hastable implements the class.
| Is This Answer Correct ? | 1 Yes | 0 No |
Post New Answer View All Answers
How do you invoke a method?
What is string in java with example?
What is instance means in java?
What happens when a thread cannot acquire a lock on an object in java programming?
What is meant by class loader? How many types are there?
What is jit compiler ?
Can we declare array without size in java?
How would you format a date in java? I.e. In the ddmmyyy format?
What do you know about the garbage collector?
How does arraylist size increase in java?
What do you mean by scope of variable?
Explain about interrupt() method of thread class ?
How can we make a class virtual?
What is difference between hashset and hashmap in java?
Is alive in java?