33. try {
34. // some code here
35. } catch (NullPointerException e1) {
36. System.out.print(”a”);
37. } catch (RuntimeException e2) {
38. System.out.print(”b”);
39. } finally {
40. System.out.print(”c”);
41. }
What is the result if a NullPointerException occurs on line
34?
1 c
2 a
3 ab
4 ac
Answer Posted / kumar
Once the first catch block executed then rest of the block
skipped.The control transfer to the finally block
the answer is "ac"
| Is This Answer Correct ? | 4 Yes | 0 No |
Post New Answer View All Answers
Is there any difference between nested classes and inner classes?
Difference between Preemptive scheduling vs. Time slicing?
What are the application of stack?
What is binary tree in java?
What is the difference between preparedstatement and statement in java?
How does predicate work in java?
Difference between arraylist and vector.
What is the super void?
Is object a data type in java?
What is array initialization in java?
What does the three dot emoji mean?
Can list be null in java?
What is the purpose of the strictfp keyword?
How many unicode characters are there?
Where can I find jdk in my computer?