Wiki Markup |
---|
According to the _Java Language Specification_, [§12.5, "Creation of New Class Instances" |http://java.sun.com/docs/books/jls/third_edition/html/execution.html#12.5] \[[JLS 2005|AA. Bibliography#JLSReferences#JLS 05]\]: |
Unlike C++, the Java programming language does not specify altered rules for method dispatch during the creation of a new class instance. If methods are invoked that are overridden in subclasses in the object being initialized, then these overriding methods are used, even before the new object is completely initialized.
...
<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="780728811099611c-9d29220b-496d4cd3-8b4fb60a-6d5a2bd6ffb79327fc3465e6"><ac:plain-text-body><![CDATA[ | [ISO/IEC TR 24772:2010 | http://www.aitcnet.org/isai/] | Inheritance [RIP] | ]]></ac:plain-text-body></ac:structured-macro> |
...
<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="3bf4baf2add370ea-414daf70-4cfc4afe-bee3a7bf-a7fb3d72026bb621121d4fcb"><ac:plain-text-body><![CDATA[ | [[ESA 2005 | AA. Bibliography#ESA References#ESA 05]] | Rule 62: Do not call nonfinal methods from within a constructor | ]]></ac:plain-text-body></ac:structured-macro> | |
<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="0f8085904084d4f3-b1895544-47b340dd-8e5db00d-6714f8e7be2ee09a8df1985f"><ac:plain-text-body><![CDATA[ | [[JLS 2005 | AA. Bibliography#JLS References#JLS 05]] | [Chapter 8, Classes | http://java.sun.com/docs/books/jls/third_edition/html/classes.html], §12.5 Creation of New Class Instances | ]]></ac:plain-text-body></ac:structured-macro> |
<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="1a1fc0951953b1b7-7266c057-4a144de7-9b6880af-abe1b7749047a738fa93a399"><ac:plain-text-body><![CDATA[ | [[Rogue 2000 | AA. Bibliography#Rogue References#Rogue 00]] | Rule 81. Do not call non-final methods from within a constructor | ]]></ac:plain-text-body></ac:structured-macro> | |
Secure Coding Guidelines for the Java Programming Language, Version 3.0 | Guideline 4-4. Prevent constructors from calling methods that can be overridden |
...