Hi I have one problem with the following question answer:
a. Stores key/value pairs. b. Allows null elements, keys, and values. c. Duplicate entries replace old entries. d. Entries are sorted using a comparator or the Comparable interface.
Which of these classes provides the specified features? a. LinkedList b. TreeMap c. TreeSet d. HashMap e. HashSet f. Hashtable g. None of the above
Answer is TreeMap But according to my understanding answer should be g. None of the above as TreeMap doesn't satisfies the second condition "b. Allows null elements, keys, and values." Treemap allows null values but doesn't allow null key . Can anyone give more thought on this and explain to me is anywhere I am wrong in understanding the question or what? Thanks