Path: csiph.com!x330-a1.tempe.blueboxinc.net!newsfeed.hal-mli.net!feeder1.hal-mli.net!weretis.net!feeder4.news.weretis.net!newsfeed.utanet.at!newscore.univie.ac.at!aconews-feed.univie.ac.at!aconews.univie.ac.at!not-for-mail Newsgroups: comp.lang.java.programmer From: Andreas Leitgeb Subject: Re: Style Police (a rant) References: <36f4953c-f085-4850-85eb-bb248a8cf1bb@glegroupsg2000goo.googlegroups.com> <252cd91f-0695-4cda-8ba0-70cfbc5fbd7a@glegroupsg2000goo.googlegroups.com> <78817664-363f-4e73-99e5-ef3c0a3566af@glegroupsg2000goo.googlegroups.com> <8e9ab8cb-bfff-41f6-a995-5ff570acc683@glegroupsg2000goo.googlegroups.com> Reply-To: avl@logic.at User-Agent: slrn/pre0.9.9-111 (Linux) Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: Date: 29 Aug 2011 16:37:57 GMT Lines: 24 NNTP-Posting-Host: gamma.logic.tuwien.ac.at X-Trace: 1314635877 tunews.univie.ac.at 71616 128.130.175.3 X-Complaints-To: abuse@tuwien.ac.at Xref: x330-a1.tempe.blueboxinc.net comp.lang.java.programmer:7473 Lew wrote: > Jan Burse wrote: >> private methods can be overshadowed. You can try the >> following code by yourself: >> class A { >> private void init() { }; >> } >> class B extends A { >> public void init() { }; >> } > The constructor of 'A' still can't call the 'init()' of 'B', > which is the key point here. > In fact, nothing in class 'A' can call the 'init()' of 'B' > via 'this'; Umm... within a C'tor or method of A: if (this instanceof B) { ((B)this).init(); } ? Just nitpicking - probably wrong once again, but curious about the "how": is my interpretation of "via" too general? Is there a specific meaning of the idiom "calling via" in the JLS? Btw., that doesn't question the original and main point, anyway.