When will a thread start performing a task?

Report a typo

You have a class named PrintMessageTask that implements the Runnable interface. This class is declared to print a message to the standard output in a new thread.

In the main method of a program, there is one object of this class and one thread that relies on this object.

fun main() {
    val task: Runnable = PrintMessageTask("Hi, I'm good.")
    val worker = Thread(task)
}

When will be the message printed?

Select one option from the list
___

Create a free account to access the full topic