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


Please Help Members By Posting Answers For Below Questions

Why stringbuffer is faster than string?

533


What is a variable in java?

528


How do you do a line break in java?

489


What is the difference between method overriding and overloading?

571


How many types of memory areas are allocated by jvm?

558






define polymorphism in java

629


Is ruby built on java?

529


Give us the name of the list layoutmanagers in java?

522


What are keywords in programming?

561


What is the use of singleton class?

518


What is the protected method modifier?

561


How is treeset implemented in java?

487


What is the default value of local and global variables?

559


Why singleton pattern is better than creating singleton class with static instance?

532


What are voids?

530