Java Do X IF catch was not called from a try loop
<p>Not sure if this has already been answered, but.</p>

<p>I know that in java there is the try, catch and finally blocks, but is there one which is only called if try has no errors/exceptions?</p>

<p>Currently after stating the command that needs to be run, I'm setting a boolean to true, and after the try and catch block, the program checks for if the boolean is true.</p>

<p>I'm pretty sure that there is a much simpler way, help is appreciated!</p>
