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 difference between fileinputstream and filereader in java?
Where we write javascript code in html page?
Can static methods access instance variables in java?
What are anonymous inner classes?
State the difference between strings and arrays.
What is the purpose of a parameter?
What is externalizable interface?
Write a code to show a static variable?
Which one will take more memory: an int or integer?
Explain the inheritance?
List out benefits of object oriented programming language?
what is the use of pojo (plain old java objects)? how it is interact with crystal reports? pls urgent
What is compiler and what its output.
Does java support Operator Overloading?
What is the current version of java?