Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


difference between HashMap, Hashset and hashTable?

Answers were Sorted based on User's Feedback



difference between HashMap, Hashset and hashTable?..

Answer / 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

difference between HashMap, Hashset and hashTable?..

Answer / adarsh m thimmappa

HashTable is a hashing based key-value pair data structure
- doesn't allow null as key
- doesn't allow null as value as well
- not thread safe
- oldest map based data structure available since earlier versions of java

HashMap is a hashing based key-value pair data structure
- allow one null as key
- allows multiple null as more than one value
- not thread safe

HashSet is a hashing based set representation
- holds unique set of keys
- internally uses HashMap
- allows one null value
- not thread safe

Is This Answer Correct ?    0 Yes 2 No

Post New Answer

More Advanced Java Interview Questions

Urgent Openings for Java and .NET ( India, Singapore, Australia, Japan)

2 Answers   Wipro,


diff between jsp include directive and jsp action include?

4 Answers   SolutionNET,


whats is mean by class.forName() whats the return type of class

3 Answers   SolutionNET,


what is the difference between System.out.println and out.println in java

10 Answers   CTS,


What is meant by method chaining?

0 Answers  


What are the different approaches to represent an inheritance hierarchy?

0 Answers  


Define prototype?

0 Answers  


Can I have an action without a form?

0 Answers  


how i secure my site with the https protocol.what are the steps?

0 Answers  


Hi I have joined java course. I also want additional help from any tutorials website. Please suggest me tutorials which provides easy to understand online applet tutorials?

0 Answers  


What is Lock Based Protocol and what is its use?

2 Answers   Wipro,


what is activation monitor and what is its job?

1 Answers  


Categories