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
Can a set contain duplicates?
Why is stringbuffer faster than string?
What are java threads?
Explain the selection sort algorithm?
In a container there are 5 components. I want to display the all the components names, how will you do that one?
What is high level language in computer?
Explain the scope or life time of class variables or static variables?
Why synchronization is important?
Tell us something about an iterator.
What is the access scope of a protected method?
What is an immutable object? How do you create one in java?
Why are global variables used?
What is string pool?
How to optimize the javac output?
how to create multithreaded program? Explain different ways of using thread? : Java thread