> If I want to generate a random number between a certain number, what might
> possibly be the formulae?
[quoted text clipped - 4 lines]
>
> Any help or link is appreciated. Thank you.
http://java.sun.com/j2se/1.5.0/docs/api/java/util/Random.html
int num = (new Random()).nextInt(35 - 10) + 10;
(note that it's probably better to store the Random object in a variable
somewhere for reuse... possible an instance variable, but that's a
design choice I leave to you)

Signature
Peter MacMillan
e-mail/msn: peter@writeopen.com
Peter MacMillan - 29 Apr 2005 06:57 GMT
> int num = (new Random()).nextInt(35 - 10) + 10;
just a note that nextInt excludes the upper-bound. So if you wanted to
include 35 as a possible result, you'd have to add 1 to it.
ie.
/* ... */.nextInt(max + 1 - min) + min;

Signature
Peter MacMillan
e-mail/msn: peter@writeopen.com