Article View: borland.public.jbuilder.java.language
Article #17710multiple statics?
From: Vince M
Date: Tue, 20 Oct 1998 00:00
Date: Tue, 20 Oct 1998 00:00
22 lines
1385 bytes
1385 bytes
Hello, Got a problem here: Package1 - contains a class which contains static member data. Package2 - imports and references Package1, modifying the static data. Finally, I have an application which imports Package1 in class1 and Package2 in class2. class1 and class2 are public existing in different source files. -class1 - imports Package1 and creates an object whose class exists in Package1, the object's constructor then modifes the static data -class2 - imports Package2 and invokes a method therein which in turn invokes a method in Package1 that reads the static data. The problem is that in the final step mentioned above, the static data it reads seems to be different than what was originally modified. Are there two copies of the statics hanging around here? If so, how do I force only one static instance (I thought this was the whole point of statics anyway). any help would be greatly appreciated, Vince
Technical Details
Message-ID:
<70hicv$d0v2@forums.borland.com>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f74b3,10f6e70ecc99ea17,start X-Google-Attributes: gidf74b3,public From: "Vince M" <vman47@hotmail.com> Subject: multiple statics? Date: 1998/10/20 Message-ID: <70hicv$d0v2@forums.borland.com> X-Deja-AN: 403117219 Organization: Another Netscape Collabra Server User X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3110.3 Newsgroups: borland.public.jbuilder.java.language