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
Can we execute a program without main?
What are void pointers?
Which is better 64 bit or 32 bit?
What are the access modifiers available in java?
Does hashset allow duplicates in java?
How do you classify Dialog Box?
How do you identify independent and dependent variables?
How to change the priority of thread or how to set the priority of thread?
Can an object subclass another object?
What is the basic concept of java?
How can we avoid including a header more than once?
Can we use string in the switch case?
Which keyword specify that a variable is effectively final ?
What is thread pool? How can we create thread pool in java?
What is OOP's Terms with explanation?