建立三个线程,A线程打印10次A,B线程打印10次B,C线程打印10次C,要求线程同时运行,交替打印10次ABC。
public class Print implements Runnable {
private char c;
private Print objNext;
private boolean isSetup = false;
public Print(char c) {
this.c = c;
}
public Print(char c, Print objNext) {
原创
2016-12-02 15:33:10 ·
1026 阅读 ·
0 评论