Hi buddies,
What is Daemon Thread in java? Please give an example of Daemon Thread.
Thanks!
What is Daemon Thread in java? Please give an example of Daemon Thread.
Thanks!
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Guest UserRank #1,422 · 1.2K reputationPosted Aug 3, 2011, 7:16 AM EDT
Sam HobbsRank #107 · 20.5K reputationPosted Aug 3, 2011, 10:05 AM EDT
AartiRank #2,383 · 594 reputationPosted Nov 16, 2011, 11:28 PM EST
Rijwan AnsariRank #82 · 24.2K reputationPosted Nov 20, 2021, 10:12 AM EST
Daril148 reputationPosted Nov 20, 2021, 3:35 AM EST
The daemon threads function is to provide services to the user threads. These threads have low priority.
The high priority threads are the user threads.
They are called only when the user threads are running.
They are mostly used for garbage collection like clearing garbage cache memory.
The thread that is created will inherit the created thread's daemon status.
After creating a thread object we can call the daemon method. And also the thread should be idle
Satya KarkiRank #78 · 24.6K reputationPosted Nov 20, 2021, 10:14 AM EST