stackoverflow error in following java program
<pre><code>public class testing {    
    testing t=new testing();                

    public static void main(String args[]){   
        testing t1=new testing();  
        t1.fun();  
    }

    void fun(){         
        int a=2;        
        int b=t.fun2(a);  
        System.out.println(a+" "+b);  
    }

    int fun2(int a)  
    {
        a=3;  
        return a;  
    }  
}
</code></pre>

<p>why does above code giving following error? I just want to know the reason because it is difficult to expect <code>StackOverFlowError</code> error in this case.</p>

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