He He, I feel old today. I was surprised the compiler detected the recursive constructor call as I was sure it compiles fine. And I found
here that since JDK 1.4.1 the compiler detects recursive constructor call. I must've run such a code a long time back on JDK 1.2 or something, so basically I'm wrong (post JDK 1.4.1 world). Anyway the statement made by Ziggy is right not wrong
O. Ziggy wrote:the constructor will not generate a super() statement if the first line of the constructor is a call to this()
Rohit Ramachandran wrote:No. Dude, the super class is always called. Irrespective of what the first statement of the constructor is.
I was trying to prove that the super class constructor is not called from a constructor which calls another constructor using
this which is still true. If the first statement of a constructor is a call to
this(), then a
super() call will not be there in that constructor...