🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.jbuilder.java.language
Article #17519

Re: multiple statics?

#17519
From: Lars-Erik Roald
Date: Fri, 06 Nov 1998 00:00
28 lines
1634 bytes
I have the same problem myself. Very frustrating.

-Lars-Erik

Vince M wrote:

> 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: <364329D1.21A3AC9A@ifi.ntnu.no>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <70hicv$d0v2@forums.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f74b3,10f6e70ecc99ea17
X-Google-Attributes: gidf74b3,public
From: Lars-Erik Roald <larsroal@ifi.ntnu.no>
Subject: Re: multiple statics?
Date: 1998/11/06
Message-ID: <364329D1.21A3AC9A@ifi.ntnu.no>
X-Deja-AN: 409078563
Content-Transfer-Encoding: 7bit
References: <70hicv$d0v2@forums.borland.com>
To: Vince M <vman47@hotmail.com>
Content-Type: text/plain; charset=us-ascii
Organization: Another Netscape Collabra Server User
Mime-Version: 1.0
Newsgroups: borland.public.jbuilder.java.language