Question 1 of 25
Hints left: 3
Q1
Which of the following is not a segment of memory in java?
Q2
Which of these methods is used to notify observer the change in observed object?
Q3
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); } }
Q4
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(); } }
Q6
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); } }
Q7
Which one of the following is a class loader?
Q8
Which of these exceptions is thrown by methods of System class?
Q9
Which of these methods is not a Locale class?
Q10
Which of the following is method of wrapper Integer for converting the value of an object into int?
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(b.equals(a)); } }
Q12
Which of these keywords is used to define interfaces in Java?
Q13
Which of these is a super class of wrappers Double & Integer?
Q14
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); } }
Q15
Which of the following is an incorrect statement about packages?
Q16
Which of these interfaces is implemented by TimerTask class?
Q17
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); } }
Q18
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); } }
Q19
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(); } }
Q20
Which of these class encapsulate the runtime state of an object or an interface?
Q21
All methods must be implemented of an interface.
Q22
Which of these methods is used to know whether a given Character object is part of Java's Identifiers?
Q23
Which of these method of FileReader class is used to read characters from a file?
Q24
Which of these classes encapsulate runtime environment?
Q25
Which of these class is used to read characters in a file?