I am trying to learn recursion and I am attempting to do factorial\'s via recursion instead of loops, but my program is causing \"Process is terminated due to StackOverflowExcep
In any Recursion you must have a case,where your recursion is ended.So you must enter return keyword to your function.
return
public static int fact(int y) { if (y <= 1) { return 1; } else { return y * fact(y - 1); } }