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. |
|
| ||||
Interview Questions and Answers | ||||
| ||||
Ans. No, Sorted collections don't allow addition of heterogeneous elements as they are not comparable. | ||||
Help us improve. Please let us know the company, where you were asked this question : | ||||
Like Discuss Correct / Improve  java   collections   comparable interface   treemap | ||||
Related Questions | ||||
What is Comparable Interface? | ||||
How TreeMap orders the elements if the Key is a String ? | ||||
Will it create any problem if We add elements with key as user defined object into the TreeMap ? | ||||
Where do we generally use comparable interface ? | ||||