what is the difference between HashMap and Hashtable
Answer Posted / knowledge_finder
1. HashMap allows null values for key and value whereas
Hashtable doesnt allow.
2. HashMap does not guarantee that the order of the map will
remain constant over time. 3. HashMap is non synchronized
where as Hashtable is synchronized.
4. HashTable is an Old java class but Hashmap is a new java
class in java 2.
5. In HashTable you can change the iteration but in the case
of HashMap you can change the iteration but you will get a
java.util.ConcurrentModificationException.
Is This Answer Correct ? | 35 Yes | 5 No |
Post New Answer View All Answers
What is main difference between variable and constant?
What are the five major types of reference sources?
State differences between C and Java?
Is java a software?
How do you do exponents in java?
What is thread pool in java with example?
What are the concepts of 'OOPS'?
How many bits is a float?
What is a generic code?
Explain where variables are created in memory?
What are the four corner stones of oop?
What is meant by main method?
What does you mean in math?
How do I remove a character from a string in java?
what is the significance of listiterator in java?