Accessing an instance variable in main() method?
<pre><code> class Test {
     Test obj;
     public static void main(String[] args) {
         obj = new Test();
     }
 }
</code></pre>

<p>I am aware of the fact that instance variable and non-static methods are not accessible in a static method as static method don't know about anything on heap.</p>

<p>i want to ask if main is a static method how can i access an instance variable 'obj'.</p>