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.
My understanding is this not overloading the constructor but it is new method with the same name as constructor. As you have mensioned the return type it will not be taken as constructor signature it will be considered as a method signature only....
Regards, Vinoth M
Joined: Jan 24, 2007
It means that we can create method with same constructor name. Am i right?
Constructor's name is nothing but the Class's name. And constructor do not contain any return type. (if it is containing then it's method). You can have method with the class/costructor name. No problem. But the method is not invoked when you create instance of class, if you want to invoke that method you have to invoke it explicitely.