difference between HashMap, Hashset and hashTable?

Answer Posted / sujitpingale

HashMap -
1) unsynchronized and unordered
2) Allow one null key , multiple null values


HashTable -
1) synchronized and unordered
2) Doesn't allow null key and value


HashSet -
1) synchronized and ordered
2) Sort elements in ascending order , doesn't allow duplicate elements

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Why won’t the jvm terminate when I close all the application windows?

747


Why do threads block on i/o?

674


What is a class loader? What are the different class loaders used by jvm?

577


What is difference between object state and behavior?

570


How substring() method of string class create memory leaks?

543






What is the difference between a menuitem and a checkboxmenuitem?

576


In inglish: How to convert jar to exe files? Em português: Como converter arquivos .jar para .exe?

2149


What is the difference between static and non-static with examples?

1352


What is bean? Where can it be used?

575


What is a class loader?

581


Are enterprise beans allowed to use thread.sleep()?

640


what are the activation groupworks?

1670


How would you reatach detached objects to a session when the same object has already been loaded into the session?

673


What is Stream Tokenizer?

1724


What is mdb and what is the special feature of that?

557