- class lianxi4
- {
- public static void main(String[] args)
- {
-
- zi t1=new zi();
- zi t2=new zi();
- zi t3=new zi();
- zi t4=new zi();
- t1.start();
- t2.start();
- t3.start();
- t4.start();
-
- }
- }
- class zi extends Thread
- {
- private int x=100;
- public void run()
- {
- while (true)
- {
- if (x>0)
- {
- System.out.println(x--);
- }
- }
-
- }
- }
复制代码 |
|