title: Why code in static block does not execute?
body: <p>Here i did a program when i prints  the  <code>constant</code> in <code>main</code> <code>static</code> block does not executes..
  but when i print <code>stat</code> which executes is there any importance to <code>static final</code> in java..?
  please explain</p>
  
  <pre><code>package com.test.doubt;`
  
  class Doubt {
  
    public static final int constant = 123;
    public static int stat = 123;
  
    static {
      System.out.println("Static Block");
    }
  }
  
  public class MyProgram {
  
    public static void main(String[] args) {
      System.out.println(Doubt.constant);
    }
  }
  </code></pre>