can I use the try...catch statement on java to stop the execution of codes on error? just like the exit sub on vb
aldeene
0
Junior Poster in Training
Recommended Answers
Jump to Poststop the execution of codes on error
It works the opposite way. A catch can allow the program to continue executing when there is an error. Go to this site and read up:
http://docs.oracle.com/javase/tutorial/essential/exceptions/index.html
Jump to PostThe exception will stop the execution of code at the point of the error.
The catch will "catch" the execution and allow the program to continue executing in the catch block's code.
All 5 Replies
NormR1
563
Posting Sage
Team Colleague
aldeene
0
Junior Poster in Training
NormR1
563
Posting Sage
Team Colleague
aldeene
0
Junior Poster in Training
stultuske
1,116
Posting Maven
Featured Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.