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
Define reflection.
Why java is a platform independent? Explain
Which are different kinds of source code?
How to create a custom exception?
What are the differences between processes and threads?
How can we create an immutable class in java?
What is a pattern what is an anti pattern?
What is exception hierarchy in java?
What is java lang object?
Can static methods access instance variables in java?
Is zero a positive integer?
What is the public field modifier?
What is the base class of all classes?
How to create an immutable class?
What is overriding in java?