what is the difference between HashMap and Hashtable
Answer Posted / ashad
Hash Table is a legacy Class Whereas HashMap belongs to the
collections package.
HashMap allows null key and values..but it allows only one
null key and multiple null values...Whereas the HashTable
wont allow the null key and values..
HashMap allows only one null key, basic idea behind it is
that key can have unique value only if one null is assigned
to a key next null will be duplicate.
| Is This Answer Correct ? | 10 Yes | 9 No |
Post New Answer View All Answers
How do you represent a space in regex java?
What is bom encoding?
What is java reflection api?
how a programmer confirms that the data submitted has been succesfully inserted into the database(either oracle or my sql).. How a programmer confirm if there is any problem with the program he wrote for insertion... ANS:--- >executeupdate method is having boolean return type, if anything goes wrong in data insertion or data updation, it would return false. otherwise, if it successfully inserts data into the database, it would return true NOW HOW TO I CHECK IN MY DURING EXECUTION WHETHER IT RETURNS TRUE OR FALSE... WELL IT WILL DISPLAY ANY MESSAGE OR NOT
What is the purpose of return statement?
Does java trim remove newline?
What is a treeset in java?
When should I use a singleton?
What does system.gc() and runtime.gc() methods do?
Why are parameters used in functions?
Explain reverse a linked list iterative solution in java?
What is a finally block?
What is http client in java?
What is exception handling in java?
What is pojo class in java?