1.创建线程和运行线程 1.1.方式一: 直接使用Thread线程对象创建线程 @Slf4j public class TestThread { public static void main(String[] args) {