Which method is used to create a daemon thread?

(Last Updated On: September 27, 2015)


setDaemon(boolean value) – Set it to “true” to make thread as a daemon thread.


It is mandatory to call this method before thread start() method. All threads created by a programmers are user threads/normal threads unless you marked it as a daemon thread using the method setDaemon(boolean value).