java指定范围内生成随机数

来源:互联网 发布:淘宝客费用怎么算 编辑:程序博客网 时间:2024/04/30 15:29

int ran = new Random().nextInt(end) % (end-start+1) + start;

0 0
原创粉丝点击