您的位置:首页 > 其它

实现随机整数[a,b),大于等于a,小于b

2009-12-01 23:08 309 查看
public static int nextInt(int low, int high) {
int temp;
temp = (int)(Math.random()*(high-low)+low);
return temp;
}
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐