base case
The input a recursive method answers directly
Examples
if (n == 0) return 1;stopsfactorialfrom calling itself forever.
See also
The input a recursive method answers directly
Examples
if (n == 0) return 1; stops factorial from calling itself forever.
See also