Static variable in an anonymous block in java
<p>Why can't we initialize a static variable in an anonymous block in java? 
For eg : 
Why doesn't this code compile?  </p>

<pre><code>public class A {
  {
      static int a = 1;
  }
}
</code></pre>

<p>I get this compile error saying </p>

<blockquote>
  <p>Illegal modifier for the variable a; only final is permitted</p>
</blockquote>

<p>Why only final?</p>