1 nextInt方法:生成 [ 0, N )之间的随机整数
import java.util.Random;
int N = 4;
Random rand1 = new Random ();
int a = rand1.nextInt(N); //生成0,1,2,3中间的某一个数
1 nextInt方法:生成 [ 0, N )之间的随机整数
import java.util.Random;
int N = 4;
Random rand1 = new Random ();
int a = rand1.nextInt(N); //生成0,1,2,3中间的某一个数