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
Can I use % with real numbers?
how to write a program for sending mails between client and server
What is the difference between an interface and an abstract class?
Write an algorithm program in java for the following question.. In a VLSI design techniques,they used rectangles to design circuits. EVery rectangle is to be placed according to x,y coordinates. Check whether or not two rectangles overlap each other. Here overlapping of rectangles is acceptable, if 1) one rectangle intersect with other. 2) one rectangle fully covers other. The time of algorithm should not exceed o(n logn).
What access modifiers can be used for variables?
Which one will take more memory: an int or integer?
Why are there no global variables in java?
What are the data types supported by java?
What is the main purpose of java?
describe method overloading
Can we make the abstract methods static in java?
What are the disadvantages of object oriented programming?
How do you find the independent variable?
Mention a package that is used for linked list class in java.
What happens if we don’t override run method ?