Question 1 of 25
Hints left: 3
Q1
Which of these class encapsulate the runtime state of an object or an interface?
Q2
What will be the output of the following Java code? class Output { public static void main(String args[]) { long start, end; start = System.currentTimeMillis(); for (int i = 0; i < 10000000; i++); end = System.currentTimeMillis(); System.out.print(end - start); } }
Q3
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); } }
Q4
All methods must be implemented of an interface.
Q5
Which of the following is an incorrect statement about packages?
Q6
Which of these classes encapsulate runtime environment?
Q7
What will be the output of the following Java program? class newthread implements Runnable { Thread t; newthread() { t = new Thread(this,"My Thread"); t.start(); } } class multithreaded_programing { public static void main(String args[]) { new newthread(); } }
Q8
What will be the output of the following Java program? class Output { public static void main(String args[]) { String str = "true false true"; boolean x = Boolean.valueOf(str); System.out.print(x); } }
Q9
Which of these methods is not a Locale class?
Q10
What will be the output of the following Java code? class Output { public static void main(String args[]) { Double i = new Double(257.5); Double x = i.MAX_VALUE; System.out.print(x); } }
Q11
What will be the output of the following Java program? class newthread implements Runnable { Thread t; newthread() { t = new Thread(this,"My Thread"); t.start(); } public void run() { System.out.println(t); } } class multithreaded_programing { public static void main(String args[]) { new newthread(); } }
Q12
Which of these methods is used to notify observer the change in observed object?
Q13
Which of the following is method of wrapper Integer for converting the value of an object into int?
Q14
Which of these methods is used to know whether a given Character object is part of Java's Identifiers?
Q15
Which of these keywords is used to define interfaces in Java?
Q16
Which of these interfaces is implemented by TimerTask class?
Q17
Which of these class is used to read characters in a file?
Q18
Will this Java program generate same output is executed again? class Output { public static void main(String args[]) { int y = double z = Math.random(); System.out.print(y); } }
Q19
Which of the following is not a segment of memory in java?
Q21
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(b.equals(a)); } }
Q22
Which of these is a super class of wrappers Double & Integer?
Q23
Which of these method of FileReader class is used to read characters from a file?
Q24
Which of these exceptions is thrown by methods of System class?
Q25
Which one of the following is a class loader?