首页>代码>利用java线程实现数据上传demo>/ThreadTest/src/com/test/thread/MainThread.java
package com.test.thread;

import java.util.Timer;
import java.util.TimerTask;
/**
 * 主要实现某个数据库里的某张表每5秒不间断的上传到另外的数据库的某张表
 * 利用线程完成
 * @author Administrator
 * 2014-07-18
 */
public class MainThread extends TimerTask {

	@Override
	public void run() {
		TestThread test = new TestThread("this is thread");
		new Thread(test).start();
	}
	public static void main(String[] args) {
		Timer timer = new Timer();
		timer.schedule(new MainThread(), 0,5000);
	}
}
最近下载更多
newbag  LV9 2021年8月9日
wsfdwr  LV10 2019年7月10日
liuyishi  LV6 2019年4月6日
aaayyy1437  LV2 2019年3月8日
加加活宝  LV2 2018年8月1日
橙cheng001  LV8 2018年6月29日
ldjsaflj  LV1 2018年6月20日
lipiao161  LV16 2018年3月29日
wgc_jy  LV21 2018年1月5日
fxhh5057  LV13 2017年5月12日
最近浏览更多
爱情戴罪的羔羊  LV7 4月2日
1529860026  LV24 2023年6月1日
heqian  LV16 2023年1月10日
微信网友_6040315240812544  LV8 2022年10月20日
mylzdy  LV12 2022年5月12日
3199625134  LV10 2022年4月20日
liju1014 2022年4月5日
暂无贡献等级
xiaoding1999  LV7 2022年4月1日
hai77dong  LV3 2021年11月8日
随便取个名字_哈哈  LV27 2021年11月7日
顶部 客服 微信二维码 底部
>扫描二维码关注最代码为好友扫描二维码关注最代码为好友