赞
踩
int b=(int)(Math.random()*10);//生成 [0,9]之间的随机整数。 Math.random()乘以n+1,生成[0,n+1):int()后,[0,n] 所以 int temp=m+(int)(Math.random()*(n+1-m))<