import java.util.concurrent.ScheduledFuture; import java.util.concurrent.ScheduledThreadPoolExecutor; import java.util.concurrent.TimeUnit; public class Test { static int _ret = 0; static ScheduledThreadPoolExecutor executor = new ScheduledThreadPoolExecutor( 5); static ScheduledFuture<?> s; public static void main(String[] args) { // Runnable r = new Runnable() { // @Override // public void run() { // System.out.println("Hello Scheduled Thread Pool Excutor " // + _ret); // _ret++; // // if (3 <= _ret) { // boolean removeSuccess = excutor.remove(this); // System.out.println(removeSuccess); // } // } // }; s = executor.scheduleAtFixedRate(new Runnable() { @Override public void run() { System.out.println("Hello Scheduled Thread Pool Excutor " + _ret); _ret++; if (3 <= _ret) { s.cancel(false); // boolean removeSuccess = excutor.remove((Runnable)s); // System.out.println(removeSuccess); executor.purge(); } } }, 1, 1, TimeUnit.SECONDS); // System.out.println(Integer.valueOf("xiaYinCun".hashCode())); } } class n { String name = ""; String id = ""; public n(String name, String id) { this.name = name; this.id = id; } }


jkysll LV7
2021年11月14日
老干妈说她13香 LV1
2021年1月2日
dongzhan LV12
2020年12月22日
xiongfan LV6
2020年9月28日
wkc LV21
2020年7月26日
351733068 LV1
2019年11月27日
GordonMoolf LV1
2019年11月25日
yjx4510013 LV9
2019年11月14日
dsywzy3 LV1
2019年9月25日
q1659151167 LV3
2019年6月25日