#Java 7, 49 bytes
corsiKa's answer is exclusive, mine is inclusive (and slightly shorter by using recursion instead of a loop).
int q(int a,int b){return a+1!=b?a*q(a+1,b):a*b;}
Ungolfed & test code:
class Main{
public static void main(String[] a){
System.out.println(q(2, 5));
System.out.println(q(5, 10));
System.out.println(q(-4, 3));
System.out.println(q(0, 3));
System.out.println(q(-4, -1));
}
static int q(int a, int b){
return a+1 != b
? a * q(a+1, b)
: a * b;
}
}
Output:
120
151200
0
0
24