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
Why java is made?
describe method overloading
What do you mean by constructor?
Can you achieve runtime polymorphism by data members?
What is append in java?
What is the major advantage of external iteration over internal iteration?
Why is java called the platform independent programming language?
What do you understand by an io stream?
How many techniques can be employed to create a string object?
What is a blocking method in Java?
Does printwriter create a file?
What is a parameter used for?
Can a method be overloaded based on different return type but same argument type?
how does the run() method in runnable work? : Java thread
What is the difference between the ">>" and " >>>" operators in java?