java生成一定范围的随机数 java怎么使用随机抽取数组里的数据?

java怎么使用随机抽取数组里的数据?Random r=新建Random()系统输出打印(b)[r.nextInt(3)]r.nextInt(3)就是随取得0 1 2这三个数(数学.随机()*26 6

java怎么使用随机抽取数组里的数据?

Random r=新建Random()系统输出打印(b)[r.nextInt(3)]r.nextInt(3)就是随取得0 1 2这三个数(数学.随机()*26 65)

字符c2=(字符)(int)(数学.随机()*26 65)

字符c3=(字符)(int)(数学.随机()*26 65)

int x1=(int)(数学.随机()*10)

int x2=(int)(数学.随机()*10)

int x3=(int)(数学.随机()*10)

内景x4=(内景)(数学.随机()*10)

系统打印(c1)系统打印(c2)系统打印(c3)系统打印(x1)系统打印(x2)系统打印(x3)系统打印(x4)

}

}