What do you mean by "call back"? The simplest and the logical way would be to change the return type of your method to "Vector". Some other approaches would be to pass in a reference to Vector and update the Vector in your "multiply" method or have a static member in your main class but then again not recommended.
~s.o.s~
Failure as a human
11,938 posts since Jun 2006
Reputation Points: 3,281
Solved Threads: 734
If you plan on making your Vector3 class immutable, you have no option but to "return" Vector3 from your "multiply" method.
Without the restriction of immutable classes, it would be as simple as modifying the state variables of that given instance; you don't even need "v3".
public void multiple(int x) {
this.num1 *= x;
this.num2 *= x;
this.num1 *= x;
}
~s.o.s~
Failure as a human
11,938 posts since Jun 2006
Reputation Points: 3,281
Solved Threads: 734