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 / harish
Compilation fails because of an error on
Is This Answer Correct ? | 5 Yes | 12 No |
Post New Answer View All Answers
Why stringbuffer is faster than string?
What is a variable in java?
How do you do a line break in java?
What is the difference between method overriding and overloading?
How many types of memory areas are allocated by jvm?
define polymorphism in java
Is ruby built on java?
Give us the name of the list layoutmanagers in java?
What are keywords in programming?
What is the use of singleton class?
What is the protected method modifier?
How is treeset implemented in java?
What is the default value of local and global variables?
Why singleton pattern is better than creating singleton class with static instance?
What are voids?