创建多线程的四种方式 方式一:继承于Thread类 创建一个继承于Thread类的子类 重写Thread类的run()—>将此线程执行的操作声明在run()中 创建Thread类的子类的对象 通过此对象调用start() public class ThreadTest1 { public static void main(String[] args) { Thread1 test1 = new Thread1(); Thread1 test2 = new Thread1(); test1.start(); test2.start(); }