摘要: 线程的创建 java提供了三种创建线程的方法: 通过继承 Thread 类本身; 通过实现 Runnable 接口; 通过 Callable 和 Future 创建线程。 继承Thread类 步骤: 继承Thread类 重写run方法 实例化该类,调用start方法 演示: public class 阅读全文
posted @ 2018-02-03 14:21 unbelievableme 阅读(930) 评论(0) 推荐(0) 编辑