JAVASE生成一定范围的随机数

来源:互联网 发布:2016nba数据库统计 编辑:程序博客网 时间:2024/06/08 19:08
int randomNumber=(int)Math.round(Math.random()*(b-a)+a);
0 0