Path: csiph.com!eternal-september.org!feeder.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: Andreas Leitgeb Newsgroups: comp.lang.java.programmer Subject: Re: How to assign an object to another in it method? Date: Wed, 28 Jun 2017 12:20:49 -0000 (UTC) Organization: A noiseless patient Spider Lines: 16 Message-ID: References: Reply-To: avl@logic.at Injection-Date: Wed, 28 Jun 2017 12:20:49 -0000 (UTC) Injection-Info: mx02.eternal-september.org; posting-host="23c0ee9cf9d5ea2efba8eaeade2c7c13"; logging-data="22525"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/U3EdUf3Tw0Sxn2OYwMcfl" User-Agent: slrn/1.0.2 (Linux) Cancel-Lock: sha1:nMduAEXDMTYuFec15PoCSOflQ3g= Xref: csiph.com comp.lang.java.programmer:36749 lewbloch@gmail.com wrote: > Eric Douglas wrote: >> Well, anything in a constructor should only be in one constructor > Not necessarily. Constructors can chain through each other, so things > in one constructor can be in many constructors. It seems to me like you're both in violent agreement here, except for the nomenclature of what is "in a constructor". Is that what is lexically in the respective c'tor's body, or does it also include other c'tors called via this(...)? Would it then also include private, final or static methods called from some c'tor? Obviously, stuff shouldn't be exactly duplicated in multiple c'tor bodies, and doesn't need to, either, for reasons stated.