Worked example
static void countdown(int n) {
if (n == 0) { // base case: stop here
System.out.println("Done");
return;
}
System.out.println(n); // recursive case
countdown(n - 1); // call itself, closer to 0
}
countdown(3); // prints 3, then 2, then 1, then Done
Each call prints n and then calls countdown(n - 1). When n reaches 0 the base case prints Done and stops — without a base case it would never stop.