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
What is autoboxing and unboxing?
what is the difference between the methods sleep() and wait()? : Java thread
What does the string method compareto () do?
How to Sort Strings which are given in List and display in ascending order without using java api.
Explain the importance of throwable class and its methods?
What is command line argument
What is methodological framework?
What are the characteristics of java?
when to use ArrayList and when to use HashMap in webApplication.
How many times finalize method will be invoked? Who invokes finalize() method in java?
What is meant by data hiding in java?
Explain the JDB in depth & command line.
Explain about the select method with an example?
Where are global variables stored?
How to display arraylist values in java?