public class MainThread1{
public static void main(String args[]){
MinorThread m1=new MinorThread(1);
MinorThread m2=new MinorThread(2);
new Thread(m1).start();
new Thread(m2).start();
}
}
class MinorThread extends Thread{
static int n=0;
MinorThread(int id){
super();
}
public void run(){
for(int i=0;i<8000000;i++){
if(i%200000==0){
n++;
System.out.println(n+getName());
}
}
}
}