struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bill Page <>
Subject RE: Java Trivia
Date Fri, 01 Feb 2002 15:56:58 GMT
yes, but one difference between java and say C++ is that in C++ you can pass
the actual pointer meaning that you can make it point to another instance of
the object in addition to change the internal attributes.  In Java because
the pointer is always passed by value (or perhaps a copy of the pointer if
you like), you can change the internal stuff, but never the instance of the


-----Original Message-----
From: Olivier Dinocourt []
Sent: Friday, February 01, 2002 8:53 AM
To: Struts Users Mailing List
Subject: Re: Java Trivia

yes and no.

the point is not really whether arguments are passed by reference or value.
It is rather whether a chang to the argument inside the method will be
reflected outside. In the case of Objects, it will. In the case of
primitives (including Strings, if I am not wrong), it won't.

To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message