MCQs
double floor(double X) returns a largest whole number less than or equal to variable X.
Here the smallest whole number less than 3.14 is 3.
Output:
$ javac Output.java
$ java Output
3
ciel(double X) returns the smallest whole number greater than or equal to variable x.
Output:
$ javac Output.java
$ java Output
4
None.
Output:
$ javac Output.java
$ java Output
3
clone() method of object class is used to generate duplicate copy of the object on
which it is called. Copy of obj1 is generated and stored in obj2.
Output:
$ javac Output.java
$ java Output
1 2 1 2
abs() returns the absolute value of a variable.
Math class contains all the floating point functions that are used for geometry, trigonometry,
as well as several general purpose methods. Example : sin(), cos(), exp(), sqrt() etc.
ciel(double X) returns the smallest whole number greater than or equal to variable X.
double floor(double X) returns a largest whole number less than or equal to variable X.
rint() rounds up a variable to nearest integer.
None.