int random = 1 + (int) Math.random() * 3;给出的例子中random永远是1,因为生成的是随机小数,强转int就是0
自己改对
Sign in to make a reply
寒蔦
int random = 1 + (int) Math.random() * 3;给出的例子中random永远是1,因为生成的是随机小数,强转int就是0