Answers for "wait time in java"

6

java delay

Syntax :
=========================================================
	Thread.sleep(1000); // 1000 milliseconds..          |
=========================================================
int i=0;
for(;;){
	Thread.sleep(2000); // set time delay to 2 seconds.. 
  	System.out.println(i++); // output : every output will display after 2 seconds..   	
}
Posted by: Guest on May-19-2020
2

wait method in java

java.lang.Object.wait() causes current thread to wait until another thread 
invokes the notify() method or the notifyAll() method for this object.
Posted by: Guest on July-09-2020

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language