Question 1 of 25
Hints left: 3
Q1
Which of these class holds a collection of static methods and variables?
Q2
What will be the output of the following Java program? class Output { public static void main(String args[]) { String str = "TRUE"; boolean x = Boolean.valueOf(str); System.out.print(x); } }
Q3
Which of these methods return a smallest whole number greater than or equal to variable X?
Q4
Which of these class can generate pseudorandom numbers?
Q5
Which of these is specified by a File object?
Q6
Which of these class have only one field?
Q7
Which of these method of Object class can generate duplicate copy of the object on which it is called?
Q8
Which of these methods is used to obtain value of invoking object as a long?
Q9
Which of these type parameters is used for a generic class to return and accept a number?
Q10
Which of these method returns a largest whole number less than or equal to variable X?
Q11
Which of these packages contain classes and interfaces used for input & output operations of a program?
Q12
What will be the output of the following Java code? class isinfinite_output { public static void main(String args[]) { Double d = new Double(1 / 0.); boolean x = d.isInfinite(); System.out.print(x); } }
Q13
Which of this interface is implemented by Thread class?
Q14
Which of these method converts radians to degrees?
Q15
Which of the following package stores all the simple data types in java?
Q16
What will be the output of the following Java program? class X { int a; double b; } class Y extends X { int c; } class Output { public static void main(String args[]) { X a = new X(); Y b = new Y(); Class obj; obj = b.getClass(); System.out.print(obj.isLocalClass()); } }
Q17
What will be the output of the following Java program? class X { int a; double b; } class Y extends X { int c; } class Output { public static void main(String args[]) { X a = new X(); Y b = new Y(); Class obj; obj = a.getClass(); System.out.print(obj.getName()); } }
Q18
Which of these methods of a Thread class is used to suspend a thread for a period of time?
Q19
Which of these is a method to clear all the data present in output buffers?
Q20
Which of these class is not a member class of java.io package?
Q21
Random is a final class?
Q22
Which of these method return a pseudorandom number?
Q23
What will be the output of the following Java code? class Output { public static void main(String args[]) { byte a[] = { 65, 66, 67, 68, 69, 70 }; byte b[] = { 71, 72, 73, 74, 75, 76 }; System.arraycopy(a, 1, b, 3, 0); System.out.print(new String(a) + " " + new String(b)); } }
Q24
What will be the output of the following Java program? class Output { public static void main(String args[]) { char a = (char) 98; a = Character.toUpperCase(a); System.out.print(a); } }
Q25
Which of the following methods is a method of wrapper Integer for obtaining hash code for the invoking object?