Passing reference - any dedicated class?
Hi there,
I need to pass an Integer to a function, and I want it to be modified by that function. However, AFAIK, this can be done only by passing my Integer argument as a component of an other class, for example:
class IntegerBox {
public Integer integer;
}
void myFunction( IntegerBox box ) {
box.integer= box.integer * 2; //just an example
}
So, where's the problem? I suppose there is already a class in Java's library, and I don't want to create any classes duplicating those in JDK. I just need a class having Object getObject() and void setObject( Object obj ).
If there is such a class, please tell me, thanks.

