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


Please Help Members By Posting Answers For Below Questions

Which collections are thread safe in java?

485


Is multiple inheritance supported by java?

511


What is a numeric literal?

534


Is static a singleton?

528


How many ways can an argument be passed to a subroutine and explain them?

585






Explain the difference between an Interface and an Abstract class?

640


How can we create a thread in java?

593


Define how can we find the actual size of an object on the heap?

665


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?

1947


How are multiple inheritances done in Java?

624


What is an argument in java?

515


How to compare two strings in java program?

678


What is bool mean?

575


'A class is a template for an object' explain this statement.

552


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

1465