Q:

Combinations function in Java

In one of the examples in my book it creates two methods. One called combinations and one called factorial. The body on the combinations method contains the following code
private int combinations(int n, int k){
  return factorial(n) / (factorial (k) * factorial (n-k));
    }

In an example of actually seeing how the math works out for this formula the textbook gives the following example. With n = 5 and k = 2. It gives the following steps and says you should get 10. I'm having difficulty understating the logic.  
Does ! have a special meaning in this case? How does 5! = 120 and how does !2 x !3 = 2 x 6?  
C (n,k)  =     n! 
           _________
           k! x (n - k)! 

C (5,2)  =     5! 
           ___________
             2! x !3 

         =   120 
           _________
             2 x 6 

         =  10

A:

n! means factorial(n). It is equal to: -
n! = n * (n - 1) * (n - 2) * .... * 1

So, 
5! = 5 * 4 * 3 * 2 * 1 = 120

And !3 is rather a typo in your book. It doesn't represent a factorial

