Article View: borland.public.jbuilder.java.language
Article #15082Re: Illogical constructor behaviour?
From: Dion Gillard
Date: Fri, 16 Jul 1999 00:00
Date: Fri, 16 Jul 1999 00:00
23 lines
1523 bytes
1523 bytes
In article <378c7224.5379925@forums.inprise.com>, Tom.Eugelink@OVSoftware.com says... | On 13 Jul 1999 11:06:11 +0200, Tor Iver Wilhelmsen | <tor.wilhelmsen@sds.no> wrote: | | >Tom.Eugelink@OVSoftware.com writes: | > | >> Afterall, I did enter the constructor of the fireman class, so I feel | >> that that is enough reason to have all instance variables not only | >> allocated but also declared. | > | >No, because the language _specifies_ that the superclass constructor | >is called first (all the way down to Object) before initialization of | >fields happens. This is known behaviour. | | Well, then we can conclude that I do not agree with that | specification, unless someone explains the reason for it to me. We can indeed conclude this. The reason is consistency. Why have two ways to determine which method should be called, based on whether you're in the super class' constructor or not? dIon
Technical Details
Message-ID:
<MPG.11f734ffaf88e14d989683@forums.inprise.com>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<3789a7ea.1163072@forums.inprise.com> <uzp1241hv.fsf@sds.no> <378adee2.3105084@forums.inprise.com> <uhfn8aph8.fsf@sds.no> <378c7224.5379925@forums.inprise.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f74b3,c150801d0979e255 X-Google-Attributes: gidf74b3,public From: dion@multitask.com.au (Dion Gillard) Subject: Re: Illogical constructor behaviour? Date: 1999/07/16 Message-ID: <MPG.11f734ffaf88e14d989683@forums.inprise.com> X-Deja-AN: 501435655 References: <3789a7ea.1163072@forums.inprise.com> <uzp1241hv.fsf@sds.no> <378adee2.3105084@forums.inprise.com> <uhfn8aph8.fsf@sds.no> <378c7224.5379925@forums.inprise.com> Organization: Multitask Consulting Newsgroups: borland.public.jbuilder.java.language