import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.Random;
public class DoubleColorBallGenerator {
public static void main(String[] args) {
List redBalls = new ArrayList<>();
Random random = new Random();
for (int i = 0; i < 6; i++) {
int redBall = random.nextInt(33) + 1;
while (redBalls.contains(redBall)) {
redBall = random.nextInt(33) + 1;
}
redBalls.add(redBall);
}
Collections.sort(redBalls);
int blueBall = random.nextInt(16) + 1;
System.out.println('双色球号码为:' + redBalls.toString() + ' + ' + blueBall);
}
}