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
What is the association?
Can we call the run() method instead of start()?
What is the final blank variable?
What is ordered map in java?
What do you mean by append?
When a thread is executing synchronized methods , then is it possible to execute other synchronized methods simultaneously by other threads?
Why is multithreading important?
What are the elements of java?
What do you understand by a Static Variable?
What is the maximum size of byte array in java?
How do you implement tree mirroring in java?
v-model life cycle
What are parameters in a method?
What is generic class?
Explain why wait(), notify() and notifyall() methods are in object class rather than in the reading class?