title: Is finally block will be executed in thread other than main thread?
body: <pre><code>public class Test {
      public static void main(String args[]) throws Exception{
          try{        
              System.out.print("1");
              throw new Exception("first");
          }   
          catch (Exception e) {
              System.out.print("2");
              throw new Exception("second");      
          }
          **finally**{
              System.out.print("3");
              try{
                  System.out.print("4");              
              }catch (Exception e) {
                  System.out.print("5");
                  throw new Exception("third");
              }
              finally{
                  System.out.print("6 ");             
              }
          }
      }   
  }
  </code></pre>
  
  <p><strong>Output at first run:</strong></p>
  
  <pre><code>12Exception in thread "main" 346 java.lang.Exception: second
      at src.dec.TST501.main(TST501.java:11)
  </code></pre>
  
  <p><strong>output at second run:</strong></p>
  
  <pre><code>12346 Exception in thread "main" java.lang.Exception: second
      at src.dec.TST501.main(TST501.java:11)
  </code></pre>
  
  <p>output at third run:
  1Exception in thread "main" java.lang.Exception: second
  2346    at src.dec.TST501.main(TST501.java:11)</p>
  
  <p>Can any one explain me how it is happening?
  Is the finally block will be a executed in any other thread than main?</p>