Answers for "java wait function"

2

how to wait a few seconds in android studio

Handler handler = new Handler();
            handler.postDelayed(new Runnable() {
                public void run() {
                    // yourMethod();
                }
            }, 5000);   //5 seconds
Posted by: Guest on August-30-2020
0

java wait

// Sleep 1 second
TimeUnit.SECONDS.sleep(1);
// Sleep 1 minute
TimeUnit.MINUTES.sleep(1);
Posted by: Guest on September-30-2021
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