currentThread //获得主线程的引用
Thread t = Thread.currentThread();
通过实现Runnable接口:
public class MyThread implements Runnable{
public void run{
}
通过继承Tread类:
public class MyThread extends Thread{