about non-static class in java
<p>My doubt is when I run the following program</p>

<pre><code>public class NonStatic
{
  class a
  {
    static  int b;
  }
}
</code></pre>

<p>The compiler is giving a error that "inner classes cannot have static declarations"</p>

<p>ok,then I made a change instead of "static int b" to "final static int b" its giving</p>

<p>same error but when I wrote "final static int b=10" means with initialization compiler </p>

<p>didn't complain,please can any body explain this what's the concept behind this.</p>
