首页 > 代码库 > 多线程abc

多线程abc

public class Test {
public static void main(String[] args) throws Exception {
Thread a = new Thread(new A());
Thread b = new Thread(new B());
Thread c = new Thread(new C());
b.start();
b.join();
a.start();
a.join();
c.start();
c.join();
}
}
class A implements Runnable {
@Override
public void run() {
System.out.println("a");
}
}
class B implements Runnable {
@Override
public void run() {
System.out.println("b");
}
}
class C implements Runnable {
@Override
public void run() {
System.out.println("c");
}

多线程abc