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
Is an empty arraylist null?
What is an escape character in java?
Explain the pointers in Java?
Explain runtime exceptions?
Is it possible to specify multiple jndi names when deploying an ejb?
Why do we need autoboxing in java?
Can an interface extend another interface?
What does main method?
What are the two ways of implementing multi-threading in java?
How to convert string to char and vice versa?
Difference between static synchronization vs. Instance synchronization?
What is difference between core java and java ee?
Can you access the private method from outside the class?
What is the difference between call by reference and call by pointer?
What is the symbol for average?