import java.util.Random;
public class Demo02Random {
public static void main(String[] args) {
Random num = new Random();
int n = 5;
for (int i = 0; i < 10; i++) {
//把随机产生的数加1
int result = num.nextInt(n) + 1;
System.out.println(result);
}
}
}