What is the floor() method of the NavigableSet interface?
Are you preparing for IT certification? With practice questions, study notes, interactive quizzes, tips and technical articles, uCertify PrepKits ensure that you get a solid grasp of core technical concepts to ace your certification exam in first attempt.
What is the floor() method of the NavigableSet interface?
Rating:
The floor() method of the NavigableSet interface returns the greatest element of the set that is smaller than or equal to the element in the method parameter. However, if there is no such element, this method returns a null value. The floor() method throws the ClassCastException if the specified element cannot be compared with the elements currently in the set. It throws the NullPointerException if the specified element is null and the given set does not permit null elements.
Rating:
Was this information helpful?
Other articles
- What is the Comparator interface?
- What is the descendingKeySet() method of the NavigableMap interface?
- What is the tailMap() method of the NavigableMap interface?
- What is the BufferedWriter class?
- What is the pollLast() method of the NavigableSet interface?