what is the difference between HashMap And HashTable?
Answer Posted / venkateswarlu
HashMap :
->It is a key,value pair.
->key are not duplicated but values can be duplicated.
->Null key is possible.
->It is not Synchronized by default.
Hashtable:
->It is also key,value pair but both are Strings only.
-> Keys are not duplicated but values can be duplicated.
->Null insertion is not possible of both(key and value).
->It is Synchronized by default.
Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
Why packages are used?
Can singleton class be cloned?
What is the final class?
2) Suppose there are 5 directories having lot of files (say txt files) in each directory. 2 things :- 2.1) You want to search for filenames which have a particular pattern. 2.2) Out of these filtered files you want to search for a particular keyword or a search string. How can you achieve this?
Is ++ operator thread-safe in java?
How to create com object in Java?
Why is java so important?
Why is the singleton pattern considered to be an anti pattern?
Write a program to reverse array in place?
What is float in java?
What is Java Package and which package is imported by default?
What is hash code collision?
How do you generate random numbers in java?
What is the importance of finally block in exception handling?
What is final keyword in java?