[1053] in java-interest
Information exchange between objects -Reply
daemon@ATHENA.MIT.EDU (David M. Williams)
Thu Aug 17 19:45:50 1995
Date: Thu, 17 Aug 1995 14:43:53 -0700
From: "David M. Williams" <dwilliams@wpo.borland.com>
To: java-interest@java.sun.com, beerkens@prl.philips.co.uk
Remember that parameters are passed by reference. You can therefore
(in your example) add the Matrix into the parameter list for the thread
constructor. The thread will then have the reference to the matrix for the
term of its natural life.
The prefered way to implement "global variables" in an OO system is
by use of static variables in a class. THe value of these variables are
available to all users of the class. This approach is taken throughout
Java.
I hope this helps - re-ask if not...
- David.
-
Note to Sun employees: this is an EXTERNAL mailing list!
Info: send 'help' to java-interest-request@java.sun.com