Why and when to use static inner class or instance inner class?
<p>I have been studying about static inner class in java. But i am not clear whats the point of using static inner class or inner class.</p>

<pre><code>class A{

    static class B{

    }

    public static void main(String[] args) {

        B b=new B();

    }

}
</code></pre>

<p>or </p>

<pre><code>class B{}
class A{
    public static void main(String[] args) {

        B b=new B();

    }

}
</code></pre>
