Question 1 of 25
Hints left: 3
Q1
Which of these class provides various types of rounding functions?
Q2
What is the return type of Math.random() method?
Q3
Classes and Methods are stored in which space?
Q4
Which of these can be used to fully abstract a class from its implementation?
Q5
What is the value of "d" in the following Java code snippet? double d = Math.round ( 2.5 + Math.random() );
Q6
Which of these coding techniques is used by method isDefined()?
Q7
Where is String Pool stored?
Q8
Which of these methods of Boolean wrapper returns boolean equivalent of an object.
Q9
Which environment variable is used to set java path?
Q10
What will be the output of the following Java program? class exception_handling { static void throwexception() throws ArithmeticException { System.out.print("0"); throw new ArithmeticException ("Exception"); } public static void main(String args[]) { try { throwexception(); } catch (ArithmeticException e) { System.out.println("A"); } } }
Q11
Which of the following methods Byte wrapper return the value as a double?
Q12
What will be the output of the following Java program? import java.lang.System; 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, 0, b, 0, a.length); System.out.print(new String(a) + " " + new String(b)); } }
Q13
What will be the output of the following Java program? import java.lang.reflect.*; class Additional_packages { public static void main(String args[]) { try { Class c = Class.forName("java.awt.Dimension"); Field fields[] = c.getFields(); for (int i = 0; i < fields.length; i++) System.out.println(fields[i]); } catch (Exception e) { System.out.print("Exception"); } } }
Q14
What will happen if we provide concrete implementation of method in interface?
Q15
Which of the following methods return the value as a double?
Q16
Which of the following is true about Java system properties?
Q17
Which of these is an correct way of defining generic class?
Q18
Which of these keywords is used by a class to use an interface defined previously?
Q19
Which system property stores installation directory of JRE?
Q20
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); } }
Q21
Which of these access specifiers can be used for a class so that its members can be accessed by a different class in the different package?
Q22
Which of the following is the correct way of implementing an interface A by class B?
Q23
Which of these class contains all the methods present in Math class?
Q24
What will be the output of the following Java program? class Output { public static void main(String args[]) { double x = 3.1; double y = 4.5; double z = Math.max( x, y ); System.out.print(z); } }
Q25
What is the use of Observable class?