When I run this function by inputting 2 and I do not understand why it returns 83 and not 5 since it should call function(1) in the else statement and then the if statement should get executed and the function should return 5.
public static int function(int y) {
if (y == 1)
return 5;
function(y - 1);
y = y + 1;
return 83;
}