线程
logmeiliulei
这个作者很懒,什么都没留下…
展开
-
线程按顺序执行
Thread的构造方法:Thread();Thread(String name),Thread(Runnable runnable,String name),Thread(Runnable runnable) 常用方法: sleep(Long mill)休眠线程, start()启动线程, getId()获取线程id, getName()获取线程名称 join()等待线程结束 isA...原创 2018-12-12 14:13:29 · 233 阅读 · 0 评论 -
线程卖票
package com.test; public class testTread { public static void main(String[] args){ myThread1 thread=new myThread1(); Thread t1=new Thread(thread,"窗口1"); Thread t2=new Thre...原创 2018-12-12 14:03:07 · 361 阅读 · 0 评论