文章目录 常用方法 常用方法 public int nextInt(int n) 生成一个随机的int值,该值的范围在[0,n)之间 public boolean nextBoolean() 生成一个随机的boolean值,true与false的几率相同