Is there any priority between multiple try/catch execution in java?
<p>In the below program, sometime i get following output:</p>

<pre><code>Number Format Execption For input string: "abc"
123
</code></pre>

<p>and sometime:</p>

<pre><code>123
Number Format Execption For input string: "abc"
</code></pre>

<p>Is there any priority between try/catch block or priority between System.out and System.err?</p>

<p>What is the reason of random output?</p>

<p>code:</p>

<pre><code>String str1 = "abc";
String str2 = "123";

     try{
         int firstInteger = Integer.parseInt(str1);
         System.out.println(firstInteger);
     }
     catch(NumberFormatException e){
         System.err.println("Number Format Execption " + e.getMessage());
     }

       try{
         int SecondInteger = Integer.parseInt(str2);
         System.out.println(SecondInteger);
         }
     catch(NumberFormatException e){
         System.err.println("Number Format Execption " + e.getMessage());
     }
</code></pre>
