创建子类的实例,并调用start()方法启动线程。 classMyThreadextendsThread{@Overridepublicvoidrun(){// 线程的执行逻辑for(inti=0;i<10;i++){System.out.println("Thread "+i);}}}publicclassMain{publicstaticvoidmain(String[]args){MyThreadthread=newMyThread();thread.start();}} 1. 2. 3. 4. 5....