While studying for the SCJP Exam, I read about this technique, which appears to be quite nifty, but I'm wondering what practical purpose it would serve.
Has anyone locally chained constructors in applied code and, if so, to what end?
Thanks.
Wannabe SCJP 1.4<br /> <br />It wasn't raining when Noah built the ark.<br /> --Howard Ruff
C Broussard
Greenhorn
Joined: Jun 18, 2004
Posts: 28
posted
0
When you say locally chain constructors, are you talking about overriding constructor signatures?
like
public class someobject{ int someobject_value = 0; public someobject(){ someobject(1); } public someobject(int i){ someobject_value = i; } }
if this is what you're talking about then yes, this is perfectly acceptable.