闲话少叙

    Random random = new Random();
    // 生成10-100内的随机数
    int i = random.nextInt(100 - 10 + 1) + 10;
    
    // 生成 [m,n] 的数字
    int n = 10;
    int m = 20;
    int i1 = random.nextInt(n - m + 1) + m;

随机数是哟个场景

相关文章:

  • 2021-10-22
  • 2021-10-30
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-10-18
  • 2022-12-23
  • 2021-12-18
相关资源
相似解决方案