取得两个数之间的值:
private static int nextInt(int min, int max) {
Random rand = new Random();
int value = 0;
while(value < min){
value = rand.nextInt(max);
}
return value;
}
private static int nextInt(int min, int max) {
Random rand = new Random();
int value = 0;
while(value < min){
value = rand.nextInt(max);
}
return value;
}