}
}
class MyThread extends Thread{
private static int num=10;
private static int total=100;
static List<Integer> list1=getNum();
static List list2=new ArrayList<>();
static List list3=new ArrayList<>();
public void run(){
int count=0;
while(true){
synchronized(Thread.class){
if(num<=0){
break;
}
count++;
System.out.println(list1.size()+"------------");
public static List<Integer> getNum(){
List<Integer> list = new ArrayList<>();
for (int i = 1; i <=total; i++) {
list.add(i);
}
Collections.shuffle(list);
return list;
}
}