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