I'm experimenting with recursion in Java and I have this method:
public static int recursion(int n) {
if(n==1) {
return 2;
} else {
int test = (recursion(n-1))/(recursion(n-1));
return test;
}
}
If I run it with n = 50, it never prints anything, so I'm guessing the recursive calls are infinite? Could anybody explain why?