On Fri, 20 Aug 2004 18:52:46 -0600, Lucero, Dennis M
<[EMAIL PROTECTED]> wrote:
> Does anyone know how to do this or why it does not work?
>

That's how java works. Java copies and passes the reference by value.
So assignments to a copy of the reference will not change the original
object.

Refer: http://www.javaworld.com/javaworld/javaqa/2000-05/03-qa-0526-pass.html

 
> Both these methods would be called from an action class.
> 
> Function void useMyForm(ActionForm form){
> SomeFormClass myForm = new SomeFormClass();
> myForm.setName("Blah");
> myForm.setAge("289");
> etc...
> 

> form = myForm;

The above assignment doesn't modify the original form once you are out
of this method, since it is a copy of the reference.

Thanks,
Kishore Senji
> 
> How can a use something similar to the first method?
> 
> I am he, as you are he, as you are me, and we are all together.
> 
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to