Given:
11. public static void main(String[] args) {
12. Integer i = uew Integer(1) + new Integer(2);
13. switch(i) {
14. case 3: System.out.println(”three”); break;
15. default: System.out.println(”other”); break;
16. }
17. }
‘What is the result?
1 three
2 other
3 An exception is thrown at runtime.
4 Compilation fails because of an error on
line 12.
Answer Posted / harish
Compilation fails because of an error on
| Is This Answer Correct ? | 5 Yes | 12 No |
Post New Answer View All Answers
Can we store variables in local blocks?
Can a class have an interface?
What are different types of states exist for a thread?
What is 32 bit float?
Which is bigger float or double java?
What are the drawbacks for singleton class?
Explain heap sort?
Which is the class in java?
Why scanner is used in java?
what is session in java?
What is java Applet?
What is nullpointerexception in java?
Is call by reference possible in java?
What is static block?
What is the need of transient variables in Java ?