Update Test_2.java

This commit is contained in:
Mandeep Moun
2025-10-28 23:17:27 -06:00
committed by GitHub
parent 47b159575d
commit 807844cb67

View File

@@ -8,5 +8,9 @@ public class Test_2{
} }
return n * factorial(n-1); return n * factorial(n-1);
} }
int result = this.factorial(5); public static void main(String[] args) {
Test_2 obj = new Test_2();
int result = obj.factorial(5);
System.out.println("Factorial: " + result);
}
} }