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
Which collections are thread safe in java?
Is multiple inheritance supported by java?
What is a numeric literal?
Is static a singleton?
How many ways can an argument be passed to a subroutine and explain them?
Explain the difference between an Interface and an Abstract class?
How can we create a thread in java?
Define how can we find the actual size of an object on the heap?
What design pattern you have used in your project? I answered Factory pattern, how it is implemented? What are its advantage? Do know about Abstract Factory?
How are multiple inheritances done in Java?
What is an argument in java?
How to compare two strings in java program?
What is bool mean?
'A class is a template for an object' explain this statement.
hi am an engineering student and my next plan is for ms in either in us or australia i got my passport but i dont know anything bout visa can u give brief idea 1)How to get prepared for visa and 2)How to apply for top universities and 3)How to pay the fee and so on These all are basic questions plz give me a clear idea