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
Can an unreferenced object be referenced again?
os is developed in c no java is more secured then c na why dont the os developed is developed using java
How hashset works internally in java?
Name and explain the types of ways which are used to pass arguments in any function in java.
what is the constructor and how many types of constructors are used in java?
How to restrict a member of a class from inheriting by its sub classes?
What is a generic type?
Difference between default and protected access specifiers?
What is the different between get and post?
What is data structure in java?
Can we have return statement in finally clause? What will happen?
Can we have two main methods in a java class?
What is the buffer limit?
Difference between association, composition and aggregation?
Where is jre installed?