So I found this code in a Java textbook and it is a piece of recursion code. I don't really understand what happens when nothing is returned ("return;") and it doesn't explain in the textbook either. I tried searching it on the internet, but couldn't find any answers either.
public static void numbers(int n) {
if (n == 0) {
throw new IllegalArgumentException();
}
if (n == 1) {
System.out.print(n);
return;
}
numbers(n - 1);
System.out.print(", " + n);
}