title: What does double initialization mean in Java methods
body: <p>I only use double initialization in java for classes 
  ex:<code>new ArrayList(){{add()}}</code> 
  But I recently wrote a code as below by mistake and JVM did not get angry for my mistake.</p>
  
  <pre><code>public void test(){
      {
          {
              ....
          }
      }
  }
  </code></pre>
  
  <p>After that made a simple example and saw the following but still didn' t understand anything expect order of running statements.</p>
  
  <pre><code>public class HelloWorld{
  
       public static void main(String []args){
          HelloWorld hw=new HelloWorld();
          hw.test1();
          System.out.println("----------");
          hw.test2();
       }
  
      public void test1(){
          {
              {
                  System.out.println("1");
              }
              System.out.println("2");
          }
          System.out.println("3");
      }
  
      public void test2(){
          System.out.println("a");
          {
              System.out.println("b");
              {
                  System.out.println("c");
              }
  
          }
  
      }
  }
  </code></pre>
  
  <p>Result:</p>
  
  <pre><code>1
  2
  3
  ----------
  a
  b
  c
  </code></pre>
  
  <p>So my question is that what does double or triple etc initializations mean in Java?</p>