Why this code doesn't execute fine. It throws java.lang.StackOverflowError. I want to know the behavior of the class.
public class A {
A a = new A();
public static void main(String[] args) {
A a = new A();
System.out.println("i'm done!");
}}