Saturday, September 17, 2011

Quiz of the day | OCPJP (12)

3. public class C {
4. public static void main(String[] c) {
5. int i = 23;
6. Integer i2;
7. Integer i3;
8. i2 = i.intValue();
9. i3 = i.valueOf(23);
10. System.out.println((i == i2) + " " + (i == i3));
11. } }

What is the result?
A. true true
B. true false
C. false true
D. false false
E. Compilation fails.
F. An exception is thrown at runtime.


DOWNLOAD the answer

0 comments: