Article View: borland.public.jbuilder.java.language
Article #14945Re: Illogical constructor behaviour?
From: Tom.Eugelink
Date: Tue, 20 Jul 1999 00:00
Date: Tue, 20 Jul 1999 00:00
20 lines
1383 bytes
1383 bytes
On 19 Jul 1999 14:54:35 +0200, Tor Iver Wilhelmsen <tor.wilhelmsen@sds.no> wrote: >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. It is not done via a method if I define an instance variable like: private String something = "Hello world"; Because which method is called if I define this variable as static? Tom
Technical Details
Message-ID:
<379424a2.91026959@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> <MPG.11f734ffaf88e14d989683@forums.inprise.com> <3792d12a.4122557@forums.inprise.com> <upv1osstw.fsf@sds.no>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f74b3,c150801d0979e255 X-Google-Attributes: gidf74b3,public From: Tom.Eugelink@OVSoftware.com Subject: Re: Illogical constructor behaviour? Date: 1999/07/20 Message-ID: <379424a2.91026959@forums.inprise.com> X-Deja-AN: 503039958 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> <upv1osstw.fsf@sds.no> Organization: Another Netscape Collabra Server User Newsgroups: borland.public.jbuilder.java.language