(String[] args)
| 6 | public class RecursiveFactorial { |
| 7 | static IntCall fact; |
| 8 | public static void main(String[] args) { |
| 9 | fact = n -> n == 0 ? 1 : n * fact.call(n - 1); |
| 10 | for(int i = 0; i <= 10; i++) |
| 11 | System.out.println(fact.call(i)); |
| 12 | } |
| 13 | } |
| 14 | /* Output: |
| 15 | 1 |