title: Catching an Exception from a called Method
body: <p>This is something that's been bugging me for a while with regards to Program Flow.</p>
  
  <p>I wanted to know if it's possible to catch an error from a Method in order to stop it from executing the Method that would normally follow it like the example bellow that I can't get to work.</p>
  
  <pre><code>public class MyClass {
  
     public static void main(String[] args) {
  
        // this method catches an exception and stops running
        method01();
  
        // this method will continue anyway which I don't want
        method02();
  
     };
  
  };
  </code></pre>
  
  <p>I would normally have a static int variable that will initialize as 0 when the program is run and then if a method ever catches an exception it will increment that int and each method will only run if the int is 0.</p>
  
  <p>This works but I was just wondering if I could replace the int shindig with exception handling.</p>