0

Im experimenting with some stuff, and i was just wondering if thwre is any way to modify the source of the parameter values passed to a method? Like if i have this method for swapping two values:

void swap(int i, int j) {
    int temp = i;
    i = j;
    j = temp;
}

Is there any way to make it so that the integers passed to the method get changed as they are modified in the method?

Kris10an
  • 548
  • 3
  • 23

0 Answers0