aspose file tools*
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes try-catch-block Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "try-catch-block" Watch "try-catch-block" New topic
Author

try-catch-block

Moya Green
Ranch Hand

Joined: Jan 24, 2002
Posts: 49
I want to check these two concepts, Am I right?Pls help!
1)A catch block should always be related with a try block;
2)A finally cannot stand alone without a try block.
-Moya
Anthony Villanueva
Ranch Hand

Joined: Mar 22, 2002
Posts: 1055
1. Yes, although a try block may have a finally block instead of a catch block.
2. Yes.
Moya Green
Ranch Hand

Joined: Jan 24, 2002
Posts: 49
Dear Anthony,
Thanks for your timely reply.
-Moya
 
wood burning stoves
 
subject: try-catch-block