The ceiling() method of the NavigableSet interface returns the smallest element of the set that is greater than or equal to the element in the method parameter. However, if there is no such element, this method returns a null value. The ceiling() 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.
Download free practice test for scjp-5-0 SCJP 5/6 exam. Click here to download CX310-065 test study guide and practice question.What is the ceiling() method of the NavigableSet interface?
November 10th, 2008 by uCertify Leave a reply »
Advertisement