TreeSet : first(), last(), lower(), higher(), descendingSet()

The first() method returns the first (lowest) element currently in this set. The last() method returns the last (highest) element currently in this set. The lower() method returns the greatest element in this set strictly less than the given element, or null if there is no such element. The higher() method returns the least element in this … Read more…