Random() Maximum

what does your random() call look like?

Integer constants that you want to be of type long need an "L" at the end, e.g. i = random(2000000L);

-j