As I was working through practice problems I came across this one where I am not sure how I got the wrong answer. I tried increasing the value of "i" by 1 and printing that value. This should print the output "5 6 7" but for some reason does not. I tried to google my answer but can't phrase the question correctly or get good results.
//assuming that the value of 'i' is 4
public static void test(int i) {
if (i < 8) {
test(i + 1);
System.out.print (i + “ “);
}
}