![](https://img-blog.csdnimg.cn/20201014180756919.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
Java多线程
dashalen
这个作者很懒,什么都没留下…
展开
-
Timer 定时任务
一、指定时间执行public class TestMain{ private static Timer timer = new Timer(); static public class MyTask extends TimerTask { @Override public void run() { System.out.p...原创 2019-08-18 17:59:39 · 223 阅读 · 0 评论 -
Thread 交替打印1-10
创建打印Service方法一锁方法public class Service { public synchronized void print(int num){ try { this.notify(); System.out.println(Thread.currentThread().getName()+ ": " ...原创 2019-08-17 20:35:50 · 171 阅读 · 0 评论 -
ThreadPoolExecutor
public class XmallQueryLogManager implements Runnable { private final static Logger logger = LoggerFactory.getLogger(XmallQueryLogManager.class); private static BlockingQueue<XmallQueryL...原创 2019-08-17 19:30:01 · 647 阅读 · 0 评论