a) String b) StringReader c) Writer d) File ...
View QuestionWhich of these packages contain classes and interfaces used for input & output operations of a program?
a) java.util b) java.lang c) java.io d) all of the mentioned
View Question
What will be the output of the following Java code?
class Output
{
public static void main(String args[])
{
Double y = new Double(257.57812);
Double i = new Double(257.578123456789);
try
{
int x = i.compareTo(y);
System.out.print(x);
}
catch(ClassCastException e)
{
System.out.print(“Exception”);
}
}
}
What will be the output of the following Java code? class Output ...
View Question
What will be the output of the following Java code?
class Output
{
public static void main(String args[])
{
Double i = new Double(257.578123456789);
float x = i.floatValue();
System.out.print(x);
}
}
What will be the output of the following Java code? class Output ...
View Question
What will be the output of the following Java code?
class Output
{
public static void main(String args[])
{
Double i = new Double(257.578);
int x = i.intValue();
System.out.print(x);
}
}
What will be the output of the following Java code? class Output ...
View Question
What will be the output of the following Java code?
class Output
{
public static void main(String args[])
{
Double i = new Double(257.5);
boolean x = i.isNaN();
System.out.print(x);
}
}
What will be the output of the following Java code? class Output ...
View QuestionWhich of these exceptions is thrown by compareTo() method defined in a double wrapper?
a) IOException b) SystemException c) CastException d) ClassCastException Answer: d Explanation: compareTo() methods compare ...
View QuestionWhich of these method of Double wrapper can be used to check whether a given value is infinite or not?
a) Infinite() b) isInfinite() c) checkInfinite() d) None of the mentioned Answer: b Explanation: isInfinite() methods returns true if ...
View QuestionWhich of these methods can be used to check whether the given value is a number or not?
a) isNaN() b) isNumber() c) checkNaN() d) checkNumber() Answer: a Explanation: isNaN() methods returns true if num specified is ...
View QuestionWhich of the following methods return the value as a double?
a) doubleValue() b) converDouble() c) getDouble() d) getDoubleValue() Answer: a Explanation: doubleValue()
View Question