java 并行编程中,thread 类直接表示线程,runnable 接口用于定义线程任务。thread 具有生命周期和状态,而 runnable 由 thread 控制。使用 thread 和 runnable 实现多线程时:1. 使用 thread 类直接创建线程;2. 使用 runnable