Need to understand this code
If MyClass includes the following declaration for Message:
public int Message(int m, int n)
{
n = n - 2;
return n - m;
}
and the following sequence of instructions is executed:
MyClass my = new MyClass();
int x = 3;
int y = 7;
x = y + my.Message(x, y - 1);
y = x + my.Message(y, x + 1);
What are the final values for x and y?
a) x is 8 and y is 8
b) x is 10 and y is 5
c) x is 10 and y is 7
d) x is 12 and y is 7
Can someone explain to me that code bit by bit please..? :( :confused: