1. 继承Thread类,实现run方法
2. 实现 Runnable接口,将该类绑定到新建的Thread对象上
class example Runnable
{
public void run()
{}
}
Invoke:
public static void main(String[] args)
Thread th = new Thread(new example());
th.start();