Multiple choice technology web technology

Which method is used to create the daemon thread?

  1. initDaemon

  2. createDaemon

  3. setDaemon

  4. runDaemon

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

In Java, the setDaemon(boolean) method is used to mark a thread as a daemon thread before it is started. Daemon threads are background threads that terminate when all non-daemon threads finish execution.