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

What variables are stored in stack?

525


Define how objects are stored in java?

559


What is a substitution variable?

557


Which class represents the socket that both the client and server use to communicate with each other?

565


What is string in java with example?

482






What is meant by final class?

560


What is the covariant return type?

574


What is string pool in java?

559


What is not object oriented programming?

501


What do you understand by private, protected and public?

515


What is the difference between sleep and wait in java?

505


What is int argc char * argv?

562


What are the major drawbacks of external iteration?

570


How many JVMs can run on a single machine and what is the meaning of Just-In-Time (JIT) compiler?

753


what is encapsulation in java? Explain

661