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 / amit mittal
Three will be the answer.
| Is This Answer Correct ? | 27 Yes | 3 No |
Post New Answer View All Answers
Define iterator and methods in iterator?
What 4 doubled?
How many types of methods are there in java?
What is array length?
What is a text string?
Explain OOPs concept.
What is native code?
Is string a datatype?
What are the advantages of java inner classes?
What is the latest version of java?
What is string subsequence method?
What is qualitative variable?
What is java string pool?
Why string is called as immutable?
Can java hashmap have duplicate keys?