Monday, December 26, 2011

Java constructors - this() call

It is possible to use this() construct, to implement local chaining of the constructors in a class.
this() - it invokes an another constructor with the corresponding parameter list withing the same class.
But, Java requires the this() call must occur as the first statement in a constructor.

No comments:

Post a Comment