| 
 
| 本帖最后由 大大老伴要跪IT 于 2014-2-14 22:54 编辑 
 分析以下程序运行结果,说明原理。
 
 public class ThreadTest {
 public static void main(String args[]) {
 MyThread t = new MyThread();
 t.run();
 t.start();
 System.out.println("A");
 }
 }
 
 class MyThread extends Thread {
 public void run() {
 try {
 Thread.sleep(3000);
 } catch (InterruptedException e) {
 }
 System.out.println("B");
 }
 }
 | 
 |