一:
package com.urit.entity;
import java.util.*;
public class rd {
public static void main(String[] args) {
Set<Integer> set = new HashSet<>();
while(set.size()<5){
set.add(new Random().nextInt(33)+1);
}
System.out.println(set);
}
}
二:
package com.urit.entity;
import java.util.Random;
public class random {
public static void main(String[] args){
Random rand = new Random();
for(int i=0; i<5; i++) {
System.out.println(rand.nextInt(33) + 1);
}
}
}
1490





