I'm very new to Java, I want to write a very simple program to find the number of ways, n, of selecting several things out of a given group which has 5 elements. The formula for this combination is 5!/n!(5-n)! with n<=5. I started out with

public int combinations (int number){

The input to the method must be an integer, and the method must also return an integer. How can I define the factorials in the denominator "n!" and "(5-n)!" in Java? For the numerator it's just 5!=5*4*3*2, but in the denominator it all depends on what value from the interval 0-5 the user chooses...

I'd greatly appreciate it if anyone could show me a simple way of doing this. :)-: