On Wed, 13 Oct 1999, Robert Simmons wrote:

> Since everything in java is passed by reference this becomes even more of an issue. 
> Therefore can I do the following to achieve the desired safety ? 

Well, everything is not passed by reference in Java.  I believe primitives
and immutable types are passed by value.  Someone know the exact rules
behind this? I always have to write a little test program to remember.
Okay, I'll stop being pedantic.

I think if you do

public void myFunction(final SomeClass var) {
        .. whatever ..
}

Will do what you desire.  Not positive though so some of the other wiser
folks on the list might wish to confirm this.


----------------------------------------------------------------------
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to