请问各位,下面这个范例程式为什么输出只会有线程0执行??
ackage Thread02;
public class main {
public static void main(String[] args) {
Mythread02 T2=new Mythread02();
Thread t1=new Thread(T2);
Thread t2=new Thread(T2);
Thread t3=new Thread(T2);
t1.start();
t2.start();
t3.start();
}
下面是宣告的class
package Thread02;
public class Mythread02 implements Runnable {
private int number=100;
public void run() {
synchronized (this) {
try {
Thread.sleep(100);
//