Hello all,
I'm a newbie to JAVA but I have to learn it in order to work with a certain
program for simulations that's available within our group. I'm having a
specific problem to which I don't see the solution.
I'm trying to access a variable that has been declared public and static in
the main class. Now, this program is multi-threaded, the main thread
executes another thread in which the simulation takes place.
I've declared a public static FileWriter in the main thread, but I'm trying
to write data to the file in question in my secondary thread. This will not
do the trick, since the FileWriter variable holds the NULL reference when
trying to write data to the file.
To all you JAVA experts: what am I doing wrong here ? How to make this
work...
I'm aware of the fact that my description may contain flaws, I've just
started working with JAVA, and the way I see things at this moment, may not
be correct. But I'm learning every day :-)...
Thanks in advance,
Wald
-------------------------------------------------------------
remove 'nospam' from e-mail adress for replies