Suppose I have a method foo that is defined thus:
void foo(MyObject a, MyObject b) {
a.set(1);
b.set(2);
}
and I might call foo like so:
MyObject a = new MyObject();
MyObject b = new MyObject();
foo(a, b);
So I am “returning” from this function via passing the arguments by reference. How to I write the Javadocs for this?
For an example, have a look at the documentation for
List.toArray(T[]):