in Education by
Which of these statement is incorrect? (a) A thread can be formed by implementing Runnable interface only (b) A thread can be formed by a class that extends Thread class (c) start() method is used to begin execution of the thread (d) run() method is used to begin execution of a thread before start() method in special cases This question was posed to me in an online quiz. The doubt is from Implementing Runnable interface for Threads in section 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
Correct choice is (d) run() method is used to begin execution of a thread before start() method in special cases To explain: run() method is used to define the code that constitutes the new thread, it contains the code to be executed. start() method is used to begin execution of the thread that is execution of run(). run() itself is never used for starting execution of the thread.

Related questions

0 votes
    Which of the following is an incorrect statement about packages? (a) Package defines a namespace in which ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Oct 24, 2021 in Education by JackTerrance
0 votes
0 votes
    Which of the following should be true of the object thrown by a thrown statement? (a) Should be ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Oct 25, 2021 in Education by JackTerrance
0 votes
    Which of the below statement about JUnit is false? (a) It is an open source framework (b) It ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Oct 24, 2021 in Education by JackTerrance
0 votes
    The statement a===b refers to _________ (a) Both a and b are equal in value, type and reference ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Oct 24, 2021 in Education by JackTerrance
0 votes
    What is a block statement in JavaScript? (a) conditional block (b) block that contains a single statement ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Oct 24, 2021 in Education by JackTerrance
0 votes
    When an empty statement is encountered, a JavaScript interpreter __________ (a) Ignores the statement (b) ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Oct 24, 2021 in Education by JackTerrance
0 votes
    What is the purpose of a return statement in a function? (a) Returns the value and continues executing ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Oct 24, 2021 in Education by JackTerrance
0 votes
0 votes
    Which of these standard collection classes implements all the standard functions on list data structure? (a) ... for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Oct 25, 2021 in Education by JackTerrance
...