Explain Why StackOverFlow error raised in this Program..? : <p>I was practicing java, and i wrote this program and once i run it, this raise an error StackOverFlow Error why ?</p>

<pre><code>public class MyClass { 

   MyClass  s=new MyClass();
    public static void main(String args[]) {
         MyClass  s1=new MyClass();

        System.out.println("Sum of x+y = ");
    }
}
</code></pre>

<p>Exception StackTrace :</p>

<pre><code>Exception in thread "main" java.lang.StackOverflowError
    at com.practice.java.dev.MyClass.&lt;init&gt;(MyClass.java:3)
    at com.practice.java.dev.MyClass.&lt;init&gt;(MyClass.java:5)
    at com.practice.java.dev.MyClass.MyClass.&lt;init&gt;(MyClass.java:5)
    at com.practice.java.dev.MyClass.&lt;init&gt;(MyClass.java:5)
    at com.practice.java.dev.MyClass.&lt;init&gt;(MyClass.java:5)
    at com.practice.java.dev.MyClass.&lt;init&gt;(MyClass.java:5)
</code></pre>

<p>Why so, Please explain it in deep ??</p>
