Untitled Document

Subscribe here to get updates on new Videos


38. TreeSetDetails part 8?




previous homenext


1. If we are depending on default natural sorting order then objects should be homogeneous and comparable otherwise we will get runtime exception saying ClassCastException.
2. But if we are defining our own sorting by comparator then objects need not be homogeneous and comparable. we can insert heterogeneous non comparable objects also.