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 the purpose of the runtime class?
What is adapter in java?
What is string [] java?
What are the types of collections in java?
Can we override private methods?
What is data member in java?
Is char a data type in java?
What are the high-level thread states in java programming?
What is a key in java?
how are methods defined?
What is a default constructor and also define copy contrucyor?
What is prime number in java?
How many unicode characters are there?
What is arrays aslist in java?
Explain about fail fast iterators in java?