What is setDaemon and how it works? I am searching in google but i am not clear with that. I want some simple example program to explain this..Please if anybody have a idea then post here.
-----------------------
suresh
Printable View
What is setDaemon and how it works? I am searching in google but i am not clear with that. I want some simple example program to explain this..Please if anybody have a idea then post here.
-----------------------
suresh
If you just want to know what setDaemon does, it is very very simple. If you give setDaemon(true) then it will make the current thread a daemon thread and vice versa.
Hope that helped.
Cheers!
Kalayama
Kalayama can you please explain with one simple example for how it works.(In C++ or Java)
-------------------------
suresh
Suresh, check this JAVA link, it should be clear to you, if you still need an example I can write it for you (Need some time as I am bit held up now)
[URL="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Thread.html#setDaemon(boolean)"]
http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Thread.html#setDaemon(boolean)[/URL]
Cheers!
Kalayama