Question 1 of 25
Hints left: 3
Q1
Random is a final class?
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 is a method to clear all the data present in output buffers?
Q4
Which of these is specified by a File object?
Q5
Which of these class can generate pseudorandom numbers?
Q6
Which of these class have only one field?
Q7
Which of these class holds a collection of static methods and variables?
Q8
Which of this interface is implemented by Thread class?
Q9
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()); } }
Q10
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); } }
Q11
Which of these method returns a largest whole number less than or equal to variable X?
Q12
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()); } }
Q13
Which of these method return a pseudorandom number?
Q14
Which of the following methods is a method of wrapper Integer for obtaining hash code for the invoking object?
Q15
Which of these methods is used to obtain value of invoking object as a long?
Q16
Which of these methods return a smallest whole number greater than or equal to variable X?
Q17
Which of these method converts radians to degrees?
Q18
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)); } }
Q19
Which of these packages contain classes and interfaces used for input & output operations of a program?
Q20
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); } }
Q21
Which of these type parameters is used for a generic class to return and accept a number?
Q22
Which of the following package stores all the simple data types in java?
Q23
Which of these class is not a member class of java.io package?
Q24
Which of these methods of a Thread class is used to suspend a thread for a period of time?
Q25
Which of these method of Object class can generate duplicate copy of the object on which it is called?