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
How variables are stored in memory?
How can you make sure that your singleton class will always return single instance in multi-threaded environment?
What is java abstraction with example?
What is string manipulation?
Where are register variables stored?
How does a for loop work java?
What exactly is java?
What is singleton service?
Which method you will use to create a new file to store some log data. Each time a new log entry is necessary, write string to the file in java ?
What is stack example?
What are the types of literals?
How do you find the independent variable?
What is stored procedure. How do you create stored procedure ?
What is defined as false sharing in the context of multithreading?
Does the order of public and static declaration matter in main method?