publicstaticvoidmain(String[] args){
Set set =newHashSet();
Set set2 =newHashSet();
String[] a ={"01","02","03","04","05","06","07","08","09","10","11","12","13","14","15","16","17","18","19","20","21","22","23","24","25","26","27","28","29","30","31","32","33","34","35"};
String[] b ={"01","02","03","04","05","06","07","08","09","10","11","12"};
Random random =newRandom();while(set.size()<6){int num = random.nextInt(a.length);
set.add(a[num]);}while(set2.size()<3){int num = random.nextInt(b.length);
set2.add(a[num]);}
System.out.println("前五个号:"+set.toString());
System.out.println("后两个号:"+set2.toString());}