what is hashmap& hashtable with example?

Answer Posted / siva kumar g.

Both are collection of objects.
Both are used to store the key , value pairs.
Hashtable is synchronized where as Hashmap is not.
Hashtable does't allow the null values.

Is This Answer Correct ?    7 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

how we can make a read-only class in java?

539


What is difference between java and java ee?

555


What is replacefirst in java?

571


java Technical questions asked by JPMC

4571


Can we compare two strings in java?

554






Can a set contain duplicates?

515


What are the two types of java?

515


What is difference between Heap and Stack Memory?

534


Which is better arraylist or vector?

567


What are the supported platforms by java programming language?

565


when you will synchronize a piece of your code? : Java thread

527


Why is whitespace important?

552


What is the use of pattern in java?

506


What is linkedlist in java?

502


Is java still necessary?

619