Java program execution
<p>Please explain me how this program is behaving?</p>

<pre><code>class A
{
    //public static String name = "asdf";

    public static final String name = "asdf";

    static {
        System.out.println("static block inside A");
    }

    {
        System.out.println("regular code block");
    }
}

public class tt 
{   
    public static void main(String ar[])
    {
        System.out.println(A.name);
        //A a = new A();
    }
}
</code></pre>

<ol>
<li><p>While executing the above program, i got the output as  -   <strong>asdf</strong><br>
Qns : Why none of the code blocks are not getting executed?</p></li>
<li><p>If i uncomment the non final static variable  name and 
comment the final static variable, i got the output as  -   <strong>static block inside A</strong><br>
                                <strong>asdf</strong>
<br>Qns : Why the regular code block is not getting executed? </p></li>
<li><p>If i comment the System.out.println(A.name); and 
uncomment the A a = new A(); in class tt
i got the output as                 -   <strong>static block inside A</strong><br>
                                <strong>regular code block</strong><br><br>
Qns: Here both blocks are getting executed.
    But what is the difference between static block and 
    regular block?</p></li>
</ol>
