/** * Created by xabcd on 2019/2/17. */ public class test_thread { public static void main(String args[]) { new testread().start(); for(int i = 0;i<10;i++) { System.out.println("main函数正在运行!"); } } } class testread extends Thread { public void run() { for (int i = 0; i < 10; i++) { System.out.println("run函数正在运行"); } } }