public class Run{
public static void main(String... args){
A a1 = new A();
}
}
class A{
public A(){
A a = new A();
}
//here as well A a = new A();
}
Why does this give a java.lang.StackOverflowError
? Is there a recursive call happening here? How does it happen?