This week's book giveaway is in the General Computing forum.
We're giving away four copies of Arduino in Action and have Martin Evans, Joshua Noble, and Jordan Hochenbaum on-line!
See this thread for details.
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes try-catch-block Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Reply 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
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: try-catch-block
 
Similar Threads
will using try/catch reduce performance?????
Illegal Argument Exception
help in exceptions
Try an Finally Working Confusion
Unreachable statement