Consider the following method that is intended to swap the values of two integer numbers:
public static void swap(int a, int b)
{
int temp = a;
a = b;
b = temp;
} // end swap
// In other code assume x=5 and y=10, and we have the
// following call
swap(x, y);
Why doesn’t the method actually swap the contents of x and y? Provide a detailed explanation.
We need at least 10 more requests to produce the solution.
0 / 10 have requested this problem solution
The more requests, the faster the answer.