1、定义类实现Runnable接口。 2、覆盖接口中的run方法。。 3、创建Thread类的对象 4、将Runnable接口的子类对象作为参数传递给Thread类的构造函数。 5、调用Thread类的start方法开启线程。