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

Is call by reference possible in java?

527


Does java set allow duplicates?

519


How can you make a class serializable in java?

562


what is method reference in java 8?

550


What is java ceil?

563






Why java is call by value?

542


Why inputstreamreader is used in java?

540


What does null mean in java?

622


What does a void function return?

541


What is regex in java?

523


What is a predicate method?

558


What is use of set in java?

486


How do you sort a list in java?

571


Convert a BST into a DLL and DLL to BST in place.

660


What is port number in java?

584