computerTotal = (int) Math.ceil(Math.random() * 21);
有人可以告诉我如何获得16 - 21随机数我在尝试实现Math.floor函数时不断出错...正如你所看到的,我不太擅长将函数放入函数中.
非常感谢!
java random math floor ceil
ceil ×1
floor ×1
java ×1
math ×1
random ×1