标签:整理 end 线程 ext ati read print package system
Java多线程整理:
package ziboshizhangdianqu; class A extends Thread{ public void run(){ for(int i=0;i<100;i++){ System.out.println("此树是我栽"); } } } class B extends Thread{ public void run(){ for(int i=0;i<100;i++){ System.out.println("此路是我开"); } } } class C extends Thread{ public void run(){ for(int i=0;i<100;i++){ System.out.println("要想过此路"); } } } class D extends Thread{ public void run(){ for(int i=0;i<100;i++){ System.out.println("留下买路财"); } } } public class Dxc { public static void main(String[] args) { new A().start(); new B().start(); new C().start(); new D().start(); } }
运行结果:
标签:整理 end 线程 ext ati read print package system
原文地址:http://www.cnblogs.com/zyn0216/p/7642570.html