Java Factorial factorial(int n)

Here you can find the source of factorial(int n)

Description

factorial

License

Open Source License

Declaration

public static long factorial(int n) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

public class Main {
    public static long factorial(int n) {
        return (n < 2) ? n : (n * factorial(n - 1));
    }/* w  w w .  jav  a  2  s . c om*/
}

Related

  1. factorial(int n)
  2. factorial(int n)
  3. factorial(int n)
  4. factorial(int n)
  5. factorial(int n)
  6. factorial(int n)
  7. factorial(int n)
  8. factorial(int n)
  9. factorial(int n)