摘要: 1. 线程的创建和启动 1.1 继承Thread 在run方法里,通过this获取当前线程。 多个线程不能共享实例变量。 1.2 通过实现接口 1.2.1 实现Runable接口 在run方法里,只能通过Thread.currentThread()获取当前线程。 多个线程可以共享实例变量。 1.2. 阅读全文
posted @ 2016-09-02 10:42 idea偶买噶 阅读(187) 评论(0) 推荐(0) 编辑