aspose file tools*
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 Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "mock question doubt " Watch "mock question doubt " New topic
Author

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 {
System.out.println("Finally");
}
1) Prints out: Finally
2) Prints out: Exception
3) Prints out: Exception Finally
4) No output
4tests.com says the answer is 3.
But i think it is 4 (assuming a=1; b=1)

Am i right?


live
Keith Lynn
Ranch Hand

Joined: Feb 07, 2005
Posts: 2367
The output will always include the word Finally.
 
jQuery in Action, 2nd edition
 
subject: mock question doubt
 
Similar Threads
Polymorphism w.r.t. overloading
q
Question from 4tests.com
a question from Dan's topic mock exam
How do you answer such questions?