直接调用Math里面的random即可,简单方便int i = (int)(Math.random()*100+1); 相关文章: 2021-12-18 2022-02-28 2022-12-23 2021-11-28 2022-02-09 2022-12-23