Welcome Guest | Sign in | Register
Exceptions - Discussion Page For Q.2673 | Java Programming Questions and Answers | Java Programming Free Online-Tests | LucentBlackBoard | LucentBlackBoard.com

Home > Java Programming > Exceptions > Questions and Answers

Q: Given:

31. // some code here
32. try {
33. // some code here
34. } catch (SomeException se) {
35. // some code here
36. } finally {
37. // some code here
38. }

Under which three circumstances will the code on line 37 be executed? (Choose three.)
A. The instance gets garbage collected.
B. The code on line 33 throws an exception.
C. The code on line 35 throws an exception.
D. The code on line 31 throws an exception.
E. The code on line 33 executes successfully.

A. BCD B. ABC
C. CDE D. BCE

Answer and Explanation

Answer:BCE

Explanation:
As we know if no exception occurs (means in 33 line) then directly finally block, if exception occurs then try ,catch ,finally (means line 33 as well as 35). Or else directly after 31 line finally block will execute. So A) is correct.

Comment on this Question

Name:

Loading...




Partner Sites
LucentBlackBoard.com                  SoftLucent.com                  LucentJobs.com
All rights reserved © 2012-2015 SoftLucent.