This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori 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.