我只想生成6位数的随机数,范围应从000000到999999。
new Random().nextInt(999999) 返回我的电话号码,但不是6位数字。
new Random().nextInt(999999)
java
java ×1