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 is meant by design patterns?
What does java final mean?
How is hashset defined in java?
What is oops in java?
What is an infinite loop in java? Explain with an example.
What is purpose of find feature?
How to store image in arraylist in java?
How do you override a method?
What does file separator do in java?
What are different types of constants?
What is substring in java?
Explain the difference between association, aggregation and inheritance relationships.
Can we create a constructor in abstract class?
Can a serialized object be transferred via network?
Can a function return a function?