摘要: public class MyThread extends Thread{ //整个的构造函数就跑在主线程中 //仅仅在run方法中的程序才跑在MyThread的线程中。 public MyThread(){ print("MyThread Construct Before"); start(); print("MyThread Construct After"); } @Override public void run(){ int i = 0; while(true){ i++; if(i<3){ print("MyThread&qu 阅读全文
posted @ 2011-04-27 20:53 奋奋 阅读(104) 评论(0) 推荐(0) 编辑