Article View: borland.public.jbuilder.java.language
Article #14931Re: Illogical constructor behaviour?
From: Tor Iver Wilhelmsen
Date: Mon, 19 Jul 1999 00:00
Date: Mon, 19 Jul 1999 00:00
12 lines
1220 bytes
1220 bytes
Tom.Eugelink@OVSoftware.com writes: > Ah, no. That is not what I mean with: when allocating instance > variable memory also initialize instance variables, do not wait for > the constructor to be entered. Well, they _are_ initialized to null and 0 and 0.0 and 0.0f and 0L depending on the type: Everything else needs to be done via code, thus needs to be in a method. A constructor is such a method. The alternative would have been to add a "default data segment" to class files, and then put constant initialization there.
Technical Details
Message-ID:
<upv1osstw.fsf@sds.no>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> <MPG.11f734ffaf88e14d989683@forums.inprise.com> <3792d12a.4122557@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: Tor Iver Wilhelmsen <tor.wilhelmsen@sds.no> Subject: Re: Illogical constructor behaviour? Date: 1999/07/19 Message-ID: <upv1osstw.fsf@sds.no> X-Deja-AN: 502701354 Sender: towi@SDSA1761 References: <3789a7ea.1163072@forums.inprise.com> <uzp1241hv.fsf@sds.no> <378adee2.3105084@forums.inprise.com> <uhfn8aph8.fsf@sds.no> <378c7224.5379925@forums.inprise.com> <MPG.11f734ffaf88e14d989683@forums.inprise.com> <3792d12a.4122557@forums.inprise.com> Organization: Another Netscape Collabra Server User Newsgroups: borland.public.jbuilder.java.language