Computer Science, asked by edwinthekkodan, 6 months ago

Which Interface in Java is not allowing null values?
HashMap
TreeMap
LinkedHashMap
Set

Answers

Answered by Zarekarp
0

Answer: Treeset

Explanation:

Answered by adventureisland
0

HashMap Interface in Java is not allowing null values.

About Interface in Java is not allowing null values :

  • The key determines the values in a TreeMap. It extends AbstractMap while implementing the NavigableMap interface.
  • It is made up entirely of one-of-a-kind items. It cannot have a null key.
  • In Java, a HashMap may contain one null key and multiple null values, allowing many keys to having null values. Null keys and null values are not permitted in hashtables.
  • One null key and several null values are allowed in a LinkedHashMap. The order in which key-value pairs are entered is maintained by the LinkedHashMap.

Similar questions