java sleep()用法求sleep()用法,这里有这个程序;import java.awt.*;import java.awt.event.*;public class xiancheng extends Thread{char c;public xiancheng (String name,char c){super(name);this.c=c;}public void run(){int k;char ch=c;System.out

来源:学生作业帮助网 编辑:六六作业网 时间:2024/12/26 23:37:33
javasleep()用法求sleep()用法,这里有这个程序;importjava.awt.*;importjava.awt.event.*;publicclassxianchengextendsT

java sleep()用法求sleep()用法,这里有这个程序;import java.awt.*;import java.awt.event.*;public class xiancheng extends Thread{char c;public xiancheng (String name,char c){super(name);this.c=c;}public void run(){int k;char ch=c;System.out
java sleep()用法
求sleep()用法,这里有这个程序;
import java.awt.*;
import java.awt.event.*;
public class xiancheng extends Thread{
char c;
public xiancheng (String name,char c){
super(name);
this.c=c;
}
public void run(){
int k;
char ch=c;
System.out.println();
System.out.print(getName()+":");
for(k=0;k

java sleep()用法求sleep()用法,这里有这个程序;import java.awt.*;import java.awt.event.*;public class xiancheng extends Thread{char c;public xiancheng (String name,char c){super(name);this.c=c;}public void run(){int k;char ch=c;System.out
th1.sleep(10); 这是让th1线程暂停10毫秒
如果你想启动th1的话
th1.start();
当调用了start方法就代表这个线程开始启动