Hah, just sent a reply stating just that.  Thanks.

Stephen

On Fri, Jan 28, 2011 at 2:45 PM, Brent Worden <brent.wor...@gmail.com>wrote:

> Actually, funkyChanger will not work because you are effectively
> reassigning the argument.  Since all arguments in Java are passed by
> value, the assignment is not realized by the caller.
>
> The only ways to get argument changes surfaced to the caller are using
> a typed return or passing in an argument whose state can be modified
> (and not by assignment).
>
> As discussed in this thread, one way to accomplish this for primitives
> is by using the MutableXxxx types found in Apache Commons Lang.
> Another common way is to using a single element array.
>
> Thanks,
>
> Brent.
>

Reply via email to