Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!news.albasani.net!.POSTED!not-for-mail From: Jan Burse Newsgroups: comp.lang.java.programmer Subject: Re: Style Police (a rant) Date: Mon, 29 Aug 2011 09:44:25 +0200 Organization: albasani.net Lines: 35 Message-ID: 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> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit X-Trace: news.albasani.net S5JhyEhfS48lL8VZZmAKQN2baV53YLW6j+cdQHr3RyGwB1bjABil56Gyjha3TGgPwPuaXcMJIGsgGQLtxdC+SA== NNTP-Posting-Date: Mon, 29 Aug 2011 07:44:33 +0000 (UTC) Injection-Info: news.albasani.net; logging-data="AdAmG5LIDcVNP1CtzGNYuF+IPnooLNni74ci7wltv18wnMaVNhQ9UYFLflivoLeZhskpKMm6T4fdB+jFp5ULYiTlShdfvebDxEeAxf9XtxzdpFyTeab2yWaJE+Y24Soc"; mail-complaints-to="abuse@albasani.net" User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:6.0) Gecko/20110820 Firefox/6.0 SeaMonkey/2.3.1 In-Reply-To: Cancel-Lock: sha1:tY1z+oX1UI0BtY72nMNBbHbBSHU= Xref: x330-a1.tempe.blueboxinc.net comp.lang.java.programmer:7458 Lew schrieb: > "A private method and all methods declared immediately > within a final class (§8.1.1.2) behave as if they are > final, since it is impossible to override them." The above refers to a final class and not to a final method. 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() { }; } It does compile, and the class loader does also accept it. > Bad choice of words. I know what you mean, but > "static" has a particular meaning in Java and this > isn't it. Oops, I had in mind that there are instructions invokestatic and invokedynamic, but infact the relevant instructions are called invokespecial and invokevirtual. The invokespecial instruction is used for private methods. See here: http://cs.au.dk/~mis/dOvs/jvmspec/ref--33.html Bye