class RandomUtil{
private long i = 100000;
public long next(){
if(i==1000000){
i = 1000000;
System.out.print("将出现重复数据")//如果你调了900000次这个方法,用random也无法避免出现重复数字。}
return i++;
}
}
class RandomUtil{
private long i = 100000;
public long next(){
if(i==1000000)
System.out.print("将出现重复数据")//如果你调了900000次这个方法,用random也无法避免出现重复数字。
return i++;
}
}