When you need pass by reference in Java to assign values to multiple parameters, how do you do it?
- by mr popo
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?