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 are the main uses of java?
What are the advantages of defining packages in java?
Why spring singleton is not thread safe?
What is method reference in java?
What is parseint?
Is main a keyword in java?
Can array grow dynamically in java?
How do I get the | symbol on my keyboard?
Is hashset sorted in java?
What is multithreading and its advantages?
Difference between string s= new string (); and string s = "abv";?
What are adapter classes?
What is the purpose of garbage collection in java, and when is it used?
What is the purpose of checked and unchecked exceptions in JAVA?
what is predefined function in java?