Random random = new Random(); int num1 = random.nextInt(10);// 0~10随机数,包括0,不包括10