public static int ifIt(int x, boolean y) {
if (x > 10 && y)
return x + 10;
else
return x;
}
Function Call | Return Value | |||
---|---|---|---|---|
ifIt(15, true) | → | |||
ifIt(15, false) | → | |||
ifIt(0, true) | → | |||
ifIt(10, true) | → | |||
ifIt(13, false) | → | |||
ifIt(20, true) | → | |||
ifIt(3, false) | → |
Experiment with this code on Gitpod.io