What happen if we add null in TreeSet. Give the logic.
Anonymous
can be added if the treeset is empty because there is no object to compare with but throws null pointer exception if the ts is non empty since the comparison of null with non null object ref throws nullpointer exception.
Check out your Company Bowl for anonymous work chats.