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 / james n saikay
Three
Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
what is use of functional interface in java 8?
When does a class need a virtual destructor?
Are generics important java?
What is a line break?
What is currentthread()?
Explain why wait(), notify() and notifyall() methods are in object class rather than in thread class?
What is indexof?
Difference between association, composition and aggregation?
What is formatted output in java?
What is string manipulation?
What is the purpose of garbage collection in java?
Give an example of use of pointers in java class.
What is meant by class loader? How many types are there?
What is the difference between method and means?
What should I import for arraylist in java?