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
You can create a string object as string str = “abc”; why cant a button object be created as button bt = “abc”;? Explain
How to make object serializable in java?
why are there separate wait and sleep methods? : Java thread
Describe string intern() methodology
How do you check if a character in a string is a digit or letter?
What is java full form?
What is predicate in java?
What is methods in java?
What are three ways in which a thread can enter the waiting state in java programming?
What will be the output of round(3.7) and ceil(3.7)?
Can we clone singleton object in java?
What is the purpose of stub and skeleton?
What does += mean in java?
Can a class have more than one object?
Do I need java on my pc?