When you need pass by reference in Java to assign values to multiple parameters, how do you do it?
Posted
by mr popo
on Stack Overflow
See other posts from Stack Overflow
or by mr popo
Published on 2010-05-04T01:02:32Z
Indexed on
2010/05/04
1:08 UTC
Read the original article
Hit count: 248
java
|pass-by-reference
In order to refactor some methods into smaller ones, I need pass by reference, since I can only have one return type. I could create a different return or parameter type whenever I need to do this, but then I'd end up with a bunch of bloated, seemingly unnecessary classes.
What is the best alternative here, besides redesigning the program, which can't be done?
© Stack Overflow or respective owner