@Testpublic void add() {//方式一Thread thread1 = new Thread("ttt") {@Overridepublic void run() {System.out.println("1");}};thread1.start();//方式二Runnable runnable = new Runnable() {@Overridepublic void run() {System.out.println("2");}};Thread thread2 = new Thread(runnable);thread2.start();//方式三Thread thread3 = new Thread(() -> {System.out.println("*********");});thread3.start();}