为什么会报错,求大神教!!!(PS:想生成某个范围的随机数)是不是Random对象初始化有错? 要怎么改才对啊?
小伙看你根骨奇佳,潜力无限,来学PHP伐。
Your randoms are all null, and you will definitely get an error... You need to create a new Random object and assign it to random:
Random random = new Random(); // 其他代码
Random random=new Random();
You must have obsessive-compulsive disorder when writing code! For example, seeing warnings makes you feel uncomfortable. . . .
Your randoms are all null, and you will definitely get an error... You need to create a new Random object and assign it to random:
Random random=new Random();
You must have obsessive-compulsive disorder when writing code! For example, seeing warnings makes you feel uncomfortable. . . .