title: Java empty block scope
body: <p>I am wondering what's the purposes of using empty block. For example,</p>
  
  <pre><code>    static{
          int x = 5;
      }
  
      public static void main (String [] args){
  
            int i = 10;
  
            {
                 int j = 0 ;
                 System.out.println(x);  // compiler error : can't find x ?? why ??
                 System.out.println(i);  // this is fine
            }
            System.out.println(j); //compiler error :  can't find j
  
      }
  </code></pre>
  
  <p>Can someone explains</p>
  
  <ol>
  <li>In what situation that we would want to use empty block.</li>
  <li>Are all the variables inside that empty block still goes on <code>stack</code> ? </li>
  <li>Why couldn't it access the <code>static variable x</code> ? </li>
  </ol>