Explain why this code doesn't work
<p>I have two classes that refer to each other:</p>

<pre><code>class B{
  A obj;
  B(A obj){
    this.obj=obj;
  }
  void display(){
    System.out.println(obj.data);//using data member of A class
  }
}

class A{
  int data=10;

  A(){
   B b =new B(new A());  //  THIS LINE GENERATES AN ERROR
   b.display();
  }
  public static void main(String args[]){
   A a=new A();
  }
}
</code></pre>

<p>If I change the offending line to read</p>

<pre><code>   B b =new B(this);
</code></pre>

<p>then it works.  I think that the two lines do the same thing.  Why does one work and not the other?</p>

<p>Also, the compiler error from the first version reads</p>

<pre><code>A.&lt;init&gt;&lt;A.java:15&gt;
</code></pre>

<p>What does this mean?</p>
