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 / balamurugan
Three is answer.
| Is This Answer Correct ? | 2 Yes | 2 No |
Post New Answer View All Answers
Is there any limitation of using inheritance?
Why we use multi threading instead of multiprocessing?
What is the difference between normal report & matrix report?
What type of language is java?
What is diamond operator in java?
When will you define a method as static?
Can static methods be inherited?
What is string buffer?
What is the difference between menuitem and checkboxmenu item?
Explain about collection interface in java?
What is finalize()?
Is java a prime method?
What do you mean by light weight and heavy weight components?
What is thread synchronization in java?
What are different exception types exceptions available in java ?