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 are multiple inheritances?
Can we write a class without main method in java?
Can we pass null as argument in java?
Can we modify the throws clause of the superclass method while overriding it in the subclass?
Can you declare an interface method static?
Define class?
What is a substring of a string?
What is data movement?
What is the benefit of lambda expressions?
What are the uses of java?
What are the advantages of unicode?
what are Hostile Applets?
Why is java called java?
Is array a class in java?
What is visibility mode?