Which thread method would you use to run a thread in the background?

  1. start()
  2. run()
  3. setDaemon(true)
  4. yield()
Correct answer setDaemon(true)

Explanation

`setDaemon(true)` makes a thread run in the background.

Update: Admin added a tag on this question

Topics

By Admin · · 28 views