title: How to instantiate non static inner class within a static method?
body: <p>I have the following piece of code:</p>
  
  <pre><code>public class MyClass {
  
     class Inner {
       int s, e, p;
     }
  
     public static void main(String args[]) {
       Inner in;
     }
  }
  </code></pre>
  
  <p>Up to this part the code is fine, but I am not able to instantiate 'in' within the main method like <code>in = new Inner()</code> as it is showing <code>non static field cannot be referenced in static context</code>.</p>
  
  <p>What is the way I can do it? I do not want to make my <code>Inner</code> class <em>static</em>.</p>