Multiple choice

Which property or method is used to assign a name to a Thread?

  1. setName()

  2. isName()

  3. Name

  4. Start()

  5. getName()

Reveal answer Fill a bubble to check yourself
C Correct answer
Explanation

Each thread has a Name property that we can set for the benefit of debugging. We can set the name of a thread only once. Naming a thread has its advantages while debugging an application.