a) Long b) Digits c) Float d) Number ...
View Question
What will be the output of the following Java program?
class Output
{
public static void main(String args[])
{
double x = 2.0;
double y = 3.0;
double z = Math.pow( x, y );
System.out.print(z);
}
}
What will be the output of the following Java program? class Output ...
View Question
What will be the output of the following Java program?
class Output
{
public static void main(String args[])
{
double x = 3.1;
double y = 4.5;
double z = Math.max( x, y );
System.out.print(z);
}
}
What will be the output of the following Java program? class Output ...
View Question
What will be the output of the following Java program?
class Output
{
public static void main(String args[])
{
int x = 3.14;
int y = (int) Math.abs(x);
System.out.print(y);
}
}
What will be the output of the following Java program? class Output ...
View Question
What is the value of “d” in the following Java code snippet?
double d = Math.round ( 2.5 + Math.random() );
What is the value of “d” in the following Java code snippet? double d = ...
View QuestionWhich of these class encapsulate the runtime state of an object or an interface?
a) Class b) Object c) ...
View QuestionWhich of these class contains only floating point functions?
a) Math b) Process c) System d) Object Answer: a Explanation: Math class contains ...
View QuestionWhich of these method is a rounding function of Math class?
a) max() b) min() c) abs() d) all of the mentioned Answer: d Explanation: max(), min() and abs() are ...
View QuestionWhat is the value of double consonant ‘E’ defined in Math class?
a) approximately 3 b) approximately 3.14 c) approximately 2.72 d) approximately 0 Answer: c Explanation: approximately 2.72
View QuestionWhich of these method of Object class can generate duplicate copy of the object on which it is called?
a) clone() b) copy() c) duplicate() d) dito() Answer: a Explanation: clone()
View Question