File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Mock Exam Errata and the fly likes Question Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Mock Exam Errata
Bookmark "Question" Watch "Question" New topic


Mamta Swain
Ranch Hand

Joined: Oct 11, 2001
Posts: 30
I saw the following question in a mock exam.
Could anybody let me know the correct single choice of the following.
Q 13.
public void divide(int a, int b) {
try {
int c = a / b;
catch (Exception e) {
System.out.print("Exception ");
} finally {

a. Prints out: Finally
b. Prints out: Exception
c. Prints out: Exception Finally
d. No output
My choice was d because from the above we cann't guess the output since the input parameter was not given.
The correct choice given was c.
Let me know if I am wrong.
- Mamta
ersin eser
Ranch Hand

Joined: Feb 22, 2001
Posts: 1072
IMHO this is a lousy Question but finally always prints anyway
I agree. Here's the link:
subject: Question
It's not a secret anymore!