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
Differences between traditional programming language and object oriented programming language?
Difference between string, stringbuffer and stringbuilder?
What is an i/o filter?
What is not object oriented programming?
How to overcome the exception object reference not set to an instance of object?
How can you make sure that your singleton class will always return single instance in multi-threaded environment?
What carriage return means?
What is static import in java?
Explain the difference between runnable and callable interface in java?
What are the different conditional statements?
What is assembly language?
What is multithreading and its advantages?
How do you add spaces in java?
Can we override the overloaded method?
What is the difference between preemptive scheduling and time slicing?