hey guys.. we are going over recursion in java. and even if you don't know much computer science or java you can pry still help a little with the actual concept.
alright ---- i have to make a procedure called multiply, and i pass it 2 variables int a, int b
so for instance , i call mulitply(3, 6) and i need to get 18. But i have to use recursion to get it.. or in other words i can't just say 3 times 6 = 18.
another example of recursion is the factorial function.. i understood that one just fine.
this is the factorial procedure and sort of what it needs to look like
if(n == 1)
return n * factorial(n-1);