Hi,
An abstract from Khalid A. Mughal book for
SCJP 1.4 says
Constructors cannot return a value and, hence, cannot specify a return type, not even void, in the constructor header, but they can contain the simple form of the return statement in the constructor body.
hence:
would compile and run and print Constructor.
But i dont understand why would we ever need to use empty return statement in a constructor when actually it cannot return anything?
Thanx
Sandy
Regards<br />Sandy<br />[SCJP 5.0 - 75%]<br />[SCWCD 1.4 - 85%]<br />------------------<br />Tiger, Tiger burning bright,<br />Like a geek who works all night,<br />What new-fangled bit or byte,<br />Could ease the hacker's weary plight?