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
What variables are stored in stack?
Define how objects are stored in java?
What is a substitution variable?
Which class represents the socket that both the client and server use to communicate with each other?
What is string in java with example?
What is meant by final class?
What is the covariant return type?
What is string pool in java?
What is not object oriented programming?
What do you understand by private, protected and public?
What is the difference between sleep and wait in java?
What is int argc char * argv?
What are the major drawbacks of external iteration?
How many JVMs can run on a single machine and what is the meaning of Just-In-Time (JIT) compiler?
what is encapsulation in java? Explain