Return to Snippet

Revision: 3978
at October 13, 2007 07:28 by pablazo


Initial Code
public static int randomNumber(int min, int max) {
	return min + (new Random()).nextInt(max-min);
}

Initial URL
http://refactormycode.com/codes/35-get-a-random-number-within-a-given-interval

Initial Description


Initial Title
Get a random number within a given interval - RefactorMyCode.com

Initial Tags
java

Initial Language
Java