Path: csiph.com!x330-a1.tempe.blueboxinc.net!newsfeed.hal-mli.net!feeder1.hal-mli.net!feeder.news-service.com!feeder.news-service.com!85.214.198.2.MISMATCH!eternal-september.org!feeder.eternal-september.org!.POSTED!not-for-mail From: "Mike Schilling" Newsgroups: comp.lang.java.programmer Subject: Re: calling own methods from constructor Date: Sat, 9 Apr 2011 22:06:19 -0700 Organization: A noiseless patient Spider Lines: 4 Message-ID: References: <41ac2ca5-83e8-4b80-92af-9704b373ec37@q36g2000yqn.googlegroups.com> <304a8aef-3852-4817-b5a7-5468fcdf11a1@x18g2000yqe.googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; format=flowed; charset="iso-8859-1"; reply-type=original Content-Transfer-Encoding: 7bit Injection-Date: Sun, 10 Apr 2011 05:06:20 +0000 (UTC) Injection-Info: mx02.eternal-september.org; posting-host="9/+TJ1sP8X95OF6DtYKdgg"; logging-data="27053"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+fwd6v/YwQ//herA1x61W5fssSCkN9VsI=" X-MimeOLE: Produced By Microsoft MimeOLE V14.0.8117.416 In-Reply-To: X-Newsreader: Microsoft Windows Live Mail 14.0.8117.416 Importance: Normal Cancel-Lock: sha1:PkYXML5ggtNug4Uf0vf6GpIgmUM= X-Priority: 3 X-MSMail-Priority: Normal Xref: x330-a1.tempe.blueboxinc.net comp.lang.java.programmer:3017 "Tom Anderson" wrote in message news:alpine.DEB.2.00.1104072305290.25031@urchin.earth.li... > > No. getClass() is final, not virtual, it is never overridden, and it does > not behave like it has been overridden. Rather, it behaves like its > implementation was: > > public Class getClass() { > return this.class; > } > > Where all objects have a secret magic hidden field called 'class' which is > set by the VM when they are allocated. That's how I've always thought about it, particularly since in 4GLs I've helped implement, that's exactly what the analogous method did.