This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
Jesper de Jong wrote:It isn't calling the other constructor automatically. Look at line 4 of Trial2.java. From the no-args constructor of Trial2, you're calling the other constructor there explicitly, with: this("b");
Thanks, I didn't know this is due to the this keyword. Found out that the this keyword can call another constructor in the same class.