title: Java "try without catch" and "catch without try"
body: <p>I am writing a Java file, but when I try to compile it I keep getting 3 error messages: </p>
  
  <p>reader.java:35: error: 'try' without 'catch', 'finally' or resource declarations
          try</p>
  
  <p>reader.java:48: error: 'catch' without 'try'
          catch(IOException e)</p>
  
  <p>reader.java:52: error: 'catch' without 'try'
          catch(Exception e)</p>
  
  <p>3 errors</p>
  
  <p>Why? What am I missing? Here is my code: </p>
  
  <pre><code>public static void processRecords(String filenameIn, Person[] personArray)
  {
      try 
      {
          FileReader fr = new FileReader(filenameIn);
          BufferedReader reader = new BufferedReader(fr);
          reader.readLine();
  
          for (int i = 0; i &lt;personArray.length; i++)
          {
              String[] data = reader.readLine().split("/t");
              personArray[i] = new Person(Integer.parseInt(data[0]), data[1], data[2], Integer.parseInt(data[3]));
          }
      }
          reader.close();
      catch(IOException e)
      {
          System.out.println("ERROR: WRONG FILE " + e.toString());
      }
      catch(Exception e)
      {
          System.out.println("ERROR" + e.toString());
      }
  }
  </code></pre>