24.128.241.48 writes:
I tried to call sleep(190) in main() but it says there is no sleep function in my main class. Do I have to put it in the run() method of my main class?
Judy
194.106.141.61 writes:
Use this....
try{
Thread.sleep(190);
}
catch(InterruptedException e){
System.out.println("Sleep Interrupted");
}
sleep(int) is a static method in the java.lang.Thread class, this means that you must refernece it using the name of the
class in which it is defined.
Joe.