title: problem creating object of inner class in java
body: <p><br>
  Here is the code.</p>
  
  <pre><code>public class Test {
          class InnerClass{
  
                 }
  
     public static void main(String[] args){
              InnerClass ic = new InnerClass();
          }
      }
  </code></pre>
  
  <p>It says the error message </p>
  
  <pre><code>non-static variable this cannot be referenced from a static context
  after creation of object ic.
  </code></pre>
  
  <p>Can anyone give me the reason?</p>
  
  <p>Thanks</p>