Can we use null as a key for a map collection ?
Javasearch.buggybread.com

Search Interview Questions


 More than 3000 questions in repository.
 There are more than 900 unanswered questions.
Click here and help us by providing the answer.
 Have a video suggestion.
Click Correct / Improve and please let us know.
Label / Company      Label / Company / Text

   



Interview Questions and Answers

 Q1. Can we use null as a key for a map collection ?Core Java
Ans. Yes , for HashMap. HashMap implements Map interface. HashMap allows one null key and any number of null values.

 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve     java   collections   hashmap   map   hashtable   yes-no     Asked in 1 Companies


Related Questions

  Difference between HashMap and Hashtable?
 Why HashTable has been deprecated ?
  What is a Property class ?
  Can we add duplicate keys in a HashMap ? What will happen if we attempt to add duplicate values ?
  Which interface does java.util.Hashtable implement?
  Which interface does java.util.Hashtable implement ?
  Which of the following is false ?
  Which of the collections allows null as the key ?

a. HashTable
b. HashMap
c. TreeMap
d. LinkedHashMap
 Difference between concurrentHashMap and HashTable ?



Help us and Others Improve. Please let us know the questions asked in any of your previous interview.

Any input from you will be highly appreciated and It will unlock the application for 10 more requests.

Company Name:
Questions Asked: