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
Can you explain the usages of class.forname()?
What is connection class in java?
What is a conditional equation?
State one difference between a template class and class template.
Why object class is super class for every class in java?
What is numeric function?
What is difference between fileinputstream and filereader in java?
Implement two stacks using a single array.
How many bits are used to represent unicode, ascii, utf-16, and utf-8 characters in java programming?
Write a function to find out longest palindrome in a given string?
What is method overloading in JAVA? Why is it not present in C ?
How does callback work in java?
What are different types of states exist for a thread?
What are access specifiers in java ?
Which types of exceptions are caught at compile time?