This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes mock question doubt Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "mock question doubt " Watch "mock question doubt " New topic

mock question doubt

raja kanak
Ranch Hand

Joined: Oct 18, 2006
Posts: 135
13) public void divide(int a, int b) {
try {
int c = a / b;
catch (Exception e) {
System.out.print("Exception ");
} finally {
1) Prints out: Finally
2) Prints out: Exception
3) Prints out: Exception Finally
4) No output says the answer is 3.
But i think it is 4 (assuming a=1; b=1)

Am i right?

Keith Lynn
Ranch Hand

Joined: Feb 07, 2005
Posts: 2367
The output will always include the word Finally.
wood burning stoves
subject: mock question doubt
Similar Threads
a question from Dan's topic mock exam
How do you answer such questions?
Polymorphism w.r.t. overloading
Question from