View Single Post
Old Aug 15th, 2005, 10:26 AM   #2
Ooble
I eat cake for breakfast.
 
Ooble's Avatar
 
Join Date: Jul 2004
Location: In my box.
Posts: 4,434
Rep Power: 9 Ooble is on a distinguished road
Well, you're asking it for a number between a number between 1 and 400, so that's what it's going to give you. To get a number between a and b, you'll want to do this:
random_number = random.nextInt(b - a) + a + 1;
See if you can figure out why that's the case.
__________________
Me :: You :: Them
Ooble is offline   Reply With Quote