java random number between -10 and 10 code example
Example 1: math.random java between 1 and 10
((int) (Math.random()*(maximum - minimum))) + minimum;
Example 2: java random number between 100 and 999
int upperBound = 999;
int lowerBound = 100;
int number = lowerBound + (int)(Math.random() * ((upperBound - lowerBound) + 1));