![](https://img-blog.csdnimg.cn/20201014180756754.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
线程
Meta999
这个作者很懒,什么都没留下…
展开
-
Thread.join()
线程的join()方法是当前线程会等待调用join()方法的线程执行完后才开始package test2;public class ThreadTest1 {static boolean flage = false;public static void main(String[] args) {final Thread threada = new Thr原创 2017-03-20 14:09:28 · 415 阅读 · 0 评论 -
创建线程
package test2;//线程基础public class ThreadTest {public static void main(String[] args) {Thread a = new Thread(new ThreadA());ThreadB b = new ThreadB();// 设置线程的优先级,默认为5,最大是10b.setPriorit原创 2017-03-20 14:48:57 · 214 阅读 · 0 评论