Random rand =new Random(25); int i; i=rand.nextInt(100);

初始化时25并没有起直接作用,rand.nextInt(100);中的100是随机数的上限,产生的随机数为0-100的整数,不包括100。

相关文章:

  • 2021-05-15
  • 2022-12-23
  • 2022-12-23
  • 2022-01-03
  • 2021-07-31
  • 2022-12-23
  • 2022-12-23
  • 2021-08-17
猜你喜欢
  • 2022-12-23
  • 2021-10-11
  • 2022-12-23
  • 2021-06-04
  • 2021-07-14
  • 2022-12-23
  • 2021-08-06
相关资源
相似解决方案