in Technology by
What are the Parameters of Thread.Sleep() in Java?

1 Answer

0 votes
by

The following are the parameters used in the sleep() method.

mls: The time in milliseconds is represented by the parameter mls. The duration for which the thread will sleep is given by the method sleep().

n: It shows the additional time up to which the programmer or developer wants the thread to be in the sleeping state. The range of n is from 0 to 999999.

The method does not return anything.

Related questions

0 votes
    Explain Thread.sleep() in Java ?...
asked May 29, 2023 in Technology by JackTerrance
0 votes
    Which of these method is used to tell the calling thread to give up a monitor and go to sleep until ... division Multithreading of Java Select the correct answer from above options...
asked Mar 1, 2022 in Education by JackTerrance
0 votes
    Describe the purpose and working of sleep() method....
asked Jan 19, 2021 in Technology by JackTerrance
0 votes
    What is sleep mode in android?...
asked Jan 14, 2021 in Technology by JackTerrance
0 votes
    i am in hurry , i want to sleep early; but i have a test for tomorrow, i have not study what can ido Select the correct answer from above options...
asked Dec 29, 2021 in Education by JackTerrance
0 votes
    He could not sleep because (i) there was an animal outside (ii) he thought savages had com (iii) his bed was uncoinfortable Select the correct answer from above options...
asked Dec 10, 2021 in Education by JackTerrance
0 votes
    Thread priority in Java is? (a) Integer (b) Float (c) double (d) long The question was asked in ... in chapter Multithreading of Java Select the correct answer from above options...
asked Mar 1, 2022 in Education by JackTerrance
0 votes
    Which feature of java 8 enables us to create a work stealing thread pool using all available processors at ... Miscellaneous of Java Select the correct answer from above options...
asked Feb 23, 2022 in Education by JackTerrance
0 votes
    I am using simple thread to execute the httpGet to server when a button is clicked, but I get ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Feb 16, 2022 in Education by JackTerrance
0 votes
    Which of the interface contains all the methods used for handling thread related operations in Java? (a) ... questions and answers pdf, java interview questions for beginners...
asked Oct 25, 2021 in Education by JackTerrance
0 votes
    Thread priority in Java is? (a) Integer (b) Float (c) double (d) long The question was asked in ... , JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Oct 24, 2021 in Education by JackTerrance
0 votes
    What are the best practices if you have a class which accepts some parameters but none of them are allowed ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked May 5, 2022 in Education by JackTerrance
0 votes
    I am new to java so excuse my lame questions:) I am trying to build a web service in Java ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Mar 19, 2022 in Education by JackTerrance
...