Printing to multiple output files in java
<p>I have two arrays that I want to print to separate files.  Here's my code:</p>

<pre><code>    try {
      PrintStream out = new PrintStream(new FileOutputStream(
          "Edges.txt"));
      for (i = 0; i &lt; bcount; i++) {
        out.println(b[i][0] + " " + b[i][1]);
      }
      out.close();

    } catch (FileNotFoundException e) {
      e.printStackTrace();
    }



    } catch (Exception ex) {
    ex.printStackTrace();
    }

    try {
      PrintStream out = new PrintStream(new FileOutputStream(
          "Nodes.txt"));
      for (i = 0; i &lt; bigbIter; i++) {
        out.println(bigb[i]);
      }
      out.close();

    } catch (FileNotFoundException e) {
      e.printStackTrace();
    }



    } catch (Exception ex) {
    ex.printStackTrace();
    }
</code></pre>

<p>If I only use the first set of try / catch / catch, it works perfectly.  But when I use both it doesn't work, giving me the errors "illegal start of type ... } catch" and "error: class, interface, or enum expected".  What am I doing wrong?</p>
