title: Is catching exceptions just lazy error checking?
body: <p>I'm sure I'm going to catch flack for this... but I'm coming from a language with no <code>try</code>/<code>catch</code> blocks and I'm learning about Java exception catching, and I'm having a hard time seeing how it's not just a lazy version of validation. I've seen a few examples like:</p>
  
  <pre><code>String Box [] = {"Book", "Pen", "Pencil"};
  while(i&lt;4)
  {
      try
      {
          System.out.println(Box[i]);     
      }
      catch(ArrayIndexOutOfBoundsException e)
      {
          System.out.println("Subscript Problem " + e);
          i++;
      }
  </code></pre>
  
  <p>and:</p>
  
  <pre><code>int y = 0;
  int x = 1;
  // try block to "SEE" if an exception occurs
  try
  {
      int z = x/y;
      System.out.println("after division");
  } 
  catch (ArithmeticException ae) 
  {
      System.out.println(" attempt to divide by 0");
  }
  </code></pre>
  
  <p>These are obviously very rudimentary examples... but IMO either these are <em>terrible</em> examples of catching errors, or there's no good reason to do it. In example one if we loop for number of elements in <code>Box</code> we don't need to check for out of bounds indexing. In example two if we check for a divisor of 0, we don't need to check for that <code>ArithmeticException</code>. </p>
  
  <p>Is there a <strong><em>good</em></strong> example or reason why using <code>try</code>/<code>catch</code> blocks is better than just good-old-fashion variable validation? or is it just the "Java" way?</p>