随机取两个数字之间的任意一个数字,代码如下:
public class Test {
public static void main(String[] args) {
long max = 1321672754175l;
long min = 1321672694175l;
Random random = new Random();
long s = Math.round(Math.random()*(max-min)+min);
System.out.println(s);
}
}
public class Test {
public static void main(String[] args) {
long max = 1321672754175l;
long min = 1321672694175l;
Random random = new Random();
long s = Math.round(Math.random()*(max-min)+min);
System.out.println(s);
}
}