龙OL单机 启动数据库的时候出现 thread thread_update is NOT exist Continue?然后点几下就关闭了。。。

WIN732位的系统... WIN7 32位的系统 展开
 我来答
xiana14
推荐于2016-07-21 · TA获得超过112个赞
知道答主
回答量:163
采纳率:0%
帮助的人:0
展开全部
package threadgroup;

class ThreadDemo3 extends Thread {
private String name;
private int delay;

public ThreadDemo3(String sname, int i_delay) {
name = sname;
delay = i_delay;

}

public void run() {
try {
sleep(delay);
} catch (InterruptedException e) {

}
System.out.println("多线程测试!\n" + name + "\n" + delay);
}

}

public class testMyThread {

public static void main(String[] args) {
ThreadDemo3 th1,th2,th3;

th1 = new ThreadDemo3("线程1", (int) (Math.random() * 900));
th2 = new ThreadDemo3("线程2", (int) (Math.random() * 900));
th3 = new ThreadDemo3("线程3", (int) (Math.random() * 900));
th1.start();
th2.start();
th3.start();

}
}

package threadgroup;

public class threadDemo {
public static void main(String[] args) {
Thread t = Thread.currentThread();
t.setName("你好吗?");
System.out.println("正在进行的Thread是:" + t);
try {
for (int i = 0; i < 5; i++) {
System.out.println("我不叫穆继超" + i);
Thread.sleep(3000);
}
} catch (Exception e) {
// TODO: handle exception
System.out.println("Thread has wrong" + e.getMessage());
}

}

}

package threadgroup;

public class threadDemo2 implements Runnable {
public threadDemo2() {
Thread t1 = Thread.currentThread();
t1.setName("第一个主进程");
System.out.println("正在运行" + t1);
Thread t2 = new Thread(this, "");
System.out.println("在创建一个进程");
t2.start();
try {
System.out.println("使他进入第一个睡眠状态");
Thread.sleep(2000);
} catch (InterruptedException e) {
System.out.println("Thread has wrong" + e.getMessage());
}
System.out.println("退出第一个进程");
}

public void run() {
try {
for (int i = 0; i < 5; i++) {
System.out.println("进程" + i);
Thread.sleep(3000);
}
} catch (InterruptedException e) {
// TODO: handle exception
System.out.println("Thread has wrong" + e.getMessage());
}
System.out.println("退出第二个进程");

}

public static void main(String[] args) {
new threadDemo2();
}
}
本回答被提问者采纳
已赞过 已踩过<
你对这个回答的评价是?
评论 收起
推荐律师服务: 若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询

为你推荐:

下载百度知道APP,抢鲜体验
使用百度知道APP,立即抢鲜体验。你的手机镜头里或许有别人想知道的答案。
扫描二维码下载
×

类别

我们会通过消息、邮箱等方式尽快将举报结果通知您。

说明

0/200

提交
取消

辅 助

模 式