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


Please Help Members By Posting Answers For Below Questions

Why java is made?

577


describe method overloading

545


What do you mean by constructor?

562


Can you achieve runtime polymorphism by data members?

603


What is append in java?

639






What is the major advantage of external iteration over internal iteration?

621


Why is java called the platform independent programming language?

587


What do you understand by an io stream?

598


How many techniques can be employed to create a string object?

568


What is a blocking method in Java?

617


Does printwriter create a file?

551


What is a parameter used for?

528


Can a method be overloaded based on different return type but same argument type?

554


how does the run() method in runnable work? : Java thread

520


What is the difference between the ">>" and " >>>" operators in java?

521