title: How to continue executing a java program after an Exception is thrown?
body: <p>My sample code is as follows:</p>
  
  <pre><code>public class ExceptionsDemo {
  
      public static void main(String[] args) {
          try {
              int arr[]={1,2,3,4,5,6,7,8,9,10};
              for(int i=arr.length;i&lt;10;i++){
                  if(i%2==0){
                      System.out.println("i =" + i);
                      throw new Exception();
                  }            
              }
          } catch (Exception e) {
              System.err.println("An exception was thrown");
          }            
      }
  }
  </code></pre>
  
  <p>My requirement is that, after the exception is caught I want to process the remaining elements of the array. How can I do this?</p>