in Education by
Which of the following is a correct constructor for thread? (a) Thread(Runnable a, String str) (b) Thread(int priority) (c) Thread(Runnable a, int priority) (d) Thread(Runnable a, ThreadGroup t) This question was posed to me in an international level competition. My enquiry is from Multithreading topic in division Multithreading of Java Select the correct answer from above options JavaScript questions and answers, JavaScript questions pdf, JavaScript question bank, JavaScript questions and answers pdf, mcq on JavaScript pdf, JavaScript questions and solutions, JavaScript mcq Test , Interview JavaScript questions, JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)

1 Answer

0 votes
by
Right answer is (a) Thread(Runnable a, String str) Explanation: Thread(Runnable a, String str) is a valid constructor for thread. Thread() is also a valid constructor.

Related questions

0 votes
    What happens when a constructor is defined for an interface? (a) Compilation failure (b) Runtime Exception ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Oct 24, 2021 in Education by JackTerrance
0 votes
    How constructor can be used for a servlet? (a) Initialization (b) Constructor function (c) Initialization ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Oct 24, 2021 in Education by JackTerrance
0 votes
0 votes
    The different variant of Date() constructor to create date object is/are ___________ i. new Date(date) ii ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Oct 24, 2021 in Education by JackTerrance
0 votes
    Which one of the following is correct for directive in JSP? (a) (b) (c) (d) This question was ... , JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Oct 24, 2021 in Education by JackTerrance
0 votes
    Which of the following stops execution of a thread? (a) Calling SetPriority() method on a Thread object ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Oct 24, 2021 in Education by JackTerrance
0 votes
    Which of the following will ensure the thread will be in running state? (a) yield() (b) notify() ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Oct 24, 2021 in Education by JackTerrance
0 votes
    Which of these method waits for the thread to terminate? (a) sleep() (b) isAlive() (c) join() ... , JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Oct 24, 2021 in Education by JackTerrance
0 votes
    Which of the following is the correct way of importing an entire package pkg'? (a) import pkg. ( ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Oct 24, 2021 in Education by JackTerrance
...