1.创建线程和运行线程 1.1.方式一: 直接使用Thread线程对象创建线程 @Slf4j public class TestThread { public static void main(String[] args) { //创建一个线程,并且指定线程名称为"t1" Thread thread =