我知道如何在 0 到 100 之间进行操作,但是我可以设置下限吗?
这就是我做 0 - 100 的方法..
int randomNum = (int) Math.ceil(Math.random() * 100);
最佳答案
生成一个 0 到 25 之间的随机数并加上 75。:)
关于java - 如何随机生成 75 - 100% 之间的数字?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4241930/