compile time error - stackOverflow, while creating new class instance : <p>below is very simple program which is giving stackOverFlow error. Here is confuse with flow. can someone tell me the exact flow of this program and give me the reason for the corresponding error.</p>

<pre><code>package test;

   class Test{

   Test tt = new Test();

   public static void main(String[] args) {
       new Test();
   }

}
</code></pre>

<p>OUTPUT -</p>

<pre><code>Exception in thread "main" java.lang.StackOverflowError
    at test.Test.&lt;init&gt;(Test.java:4)
    at test.Test.&lt;init&gt;(Test.java:4)
    at test.Test.&lt;init&gt;(Test.java:4)
    at test.Test.&lt;init&gt;(Test.java:4)
    at test.Test.&lt;init&gt;(Test.java:4)
    at test.Test.&lt;init&gt;(Test.java:4)
</code></pre>
