public class Test {
public static void main(String[] args) {
// TODO Auto-generated method stub
int result = factorial(10);
System.out.println(result);
}
public static int factorial (int num) {
if (num == 1)
return 1;
return num * factorial ( num - 1 );
}
}