1.

Which of these methods return a smallest whole number greater than or equal to variable X?(a) double ceil(double X)(b) double floor(double X)(c) double max(double X)(d) double min(double X)This question was posed to me in an interview.This intriguing question originated from Java.lang topic in chapter Exploring java.lang & java.io of Java

Answer»

The correct answer is (a) double ceil(double X)

Explanation: ceil(double X) RETURNS the SMALLEST WHOLE number greater than or EQUAL to variable X.



Discussion

No Comment Found

Related InterviewSolutions