Why null is not allowed in treemap?
Answer / Bharat Gautam
TreeMap does not allow null keys to prevent ambiguity when comparing the keys, as comparing two null keys would result in an undefined behavior. Similarly, it also does not allow null values for the same reason.
| Is This Answer Correct ? | 0 Yes | 0 No |
How many types of sorting algorithms are there?
How to compare Two Arrays?
Explain the common uses of tree database.
Can arraylist hold different types?
Can treemap key null?
What is return map?
What are the four characteristics of algorithms?
Which is faster array or linked list?
Run time memory allocation is known as ?
What is hashing technique?
Can we create a null as a key for a map collection?
What is sorting with example?