摘要:
1.错误的代码package org.lkl.thead.sync;public class ThreadSynchronized { class Outputter{ public void output(String name){ for(int i =... 阅读全文
摘要:
案例1间隔1秒以后执行task任务package org.lkl.timer;import java.util.Date;import java.util.Timer;import java.util.TimerTask;public class TimerFoo { public stati... 阅读全文
摘要:
线程的两种实现方式 继承Thread类Thread thread = new Thread(){ @Override public void run() { while(true){ try { Thread.sleep(500); } catch (In... 阅读全文