Java TreeSet : ceiling(), floor(), headSet(), tailSet()

The ceiling() method returns the least element in this set greater than or equal to the given element, or null if there is no such element. The floor() method returns the greatest element in this set less than or equal to the given element, or null if there is no such element. The headset() method returns a view of … Read more…