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 / amit mittal
Three will be the answer.
| Is This Answer Correct ? | 27 Yes | 3 No |
Post New Answer View All Answers
What are computer functions?
Can you write a java class that could be used both as an applet as well as an application?
What an i/o filter in java programming?
What is the main functionality of the remote reference layer?
What are the common uses of "this" keyword in java ?
How do you escape json?
What is a buffer in computer?
What is package private scope in java?
Which methods cannot be overridden in java?
What are reference variables in java?
What is slash r?
Give few difference between constructor and method?
How do you sort an array in java?
What is a qms manual?
What does regex mean?