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
What does %4d mean in java?
What are abstract methods in java?
How to implement an arraylist in java?
Is vector synchronized in java?
Is java type safe?
How to remove the trailing spaces from a string?
Can we extend singleton class?
What is append function?
What is the base class in java from which all classes are derived?
which one is more efficient int x; 1. if(x==null) 2.if(null==x) state which one either 1 or 2?
how to create multithreaded program? Explain different ways of using thread? When a thread is created and started, what is its initial state? : Java thread
Can we inherit inner class?
List the interfaces which extends collection interface?
How to use arraylist in java netbeans?
Does java arraylist maintain insertion order?