a) Math b) Process c) System d) Object ...
View Question
What will be the output of the following Java program?
class Output
{
public static void main(String args[])
{
Long i = new Long(256);
System.out.print(i.hashCode());
}
}
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[])
{
Integer i = new Integer(257);
float x = i.floatValue();
System.out.print(x);
}
}
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[])
{
Integer i = new Integer(257);
byte x = i.byteValue();
System.out.print(x);
}
}
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[])
{
char a[] = {‘a’, ‘5’, ‘A’, ‘ ‘};
System.out.print(Character.isDigit(a[0]) + ” “);
System.out.print(Character.isWhitespace(a[3]) + ” “);
System.out.print(Character.isUpperCase(a[2]));
}
}
What will be the output of the following Java program? class Output ...
View QuestionWhich of these methods is used to obtain value of invoking object as a long?
a) long value() b) long longValue() c) ...
View QuestionWhich of the following is method of wrapper Integer for converting the value of an object into int?
a) bytevalue() b) int intValue(); c) Bytevalue() d) Byte Bytevalue() Answer: b Explanation: int ...
View QuestionWhich of these is a wrapper for simple data type char
a) float b) Character c) String d) Integer Answer: b Explanation: Character
View QuestionWhich of these is a super class of wrappers Long, Character & Integer?
a) Long b) Digits c) Float d) Number Answer: d Explanation: Number is an abstract class containing subclasses Double, ...
View QuestionWhich of the following methods is a method of wrapper Integer for obtaining hash code for the invoking object?
a) int hash() b) int hashcode() c) int hashCode() d) Integer hashcode() Answer: c Explanation: int hashCode()
View Question