Practice mode Java

Which java.lang.Thread method causes a new thread of execution to begin?

Correct answer A. start()

Explanation

Calling start() asks the JVM to create a new thread, which then invokes the object's run() method. Calling run() directly is an ordinary method call that executes on the current thread, a very common mistake. Thread has no begin() method, and execute() belongs to the Executor interface. A thread can be started only once.

Report a problem

Answer checked How we write and check questions

Tip: press A, B, C or D to answer, and N for the next question.

Advertisement

Have a question about this answer?

Your email address will not be published. Required fields are marked *

Links and website addresses are not allowed in comments.