difference between HashMap, Hashset and hashTable?
Answers were Sorted based on User's Feedback
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 |
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 |
What are the JSP implicit objects ?
In inglish: How to convert jar to exe files? Em português: Como converter arquivos .jar para .exe?
1) Scenario: I developed my application on local system and everything is perfect and tested. Now on UAT this application is deployed on clustered server environment. They are logical or physically clustered. But application is not working over there.  What is the issue with application?  What are the first things which come in your mind?
Can constructors be synchronized in java?
important features of java which differenciate it from c++
What state does a thread enter when it terminates its processing?
What is the difference between static and non-static with examples?
which deployment descriptor element is used to configure the authentication method? a. auth-config b. login-config c. sec-config
What is jboss?
What is the lifecycle of an applet?
Why DOM Parser would take more Memory than SAX parser while they are parsing?
How many requests can a server fetch at a time?