There are no compiler error in that code.. Rather a StackOverflowError.
Notice that every instance of you class Example has a new instance of the same class..
This becomes something like this: -
a2 (has) a1 (has) a1 (has) a1 (has) a1 (has) a1 (has) a1 ........... and so on...
So, every instance of Example has another instance of Example, and it keeps going, until StackOverflowError in reached..
*NOTE:- All the a1's above are not the same, they are different instance pointing to different objects.. Since they are instance reference..
You're welcome.. But also consider giving answer to what Fred has asked..
If somehow you got the compiler error.. then post it here (full compiler error)