0

hi,
I have following question

1) is main thread is daemon thread? if yes then how?

2) what is meaning of daemon thread?

3) Does daemon thread require main method for execution?

4) Daemon thread do its execution without main method?

5) if Daemon thread require main method can any one told me where is main method of

garbage collector?

6) if its does not require main method then how it gets executed?

3
Contributors
3
Replies
4
Views
6 Years
Discussion Span
Last Post by masijade
0

A daemon thread is a thread that does not need to be explicitly ended in order to end the program and it gets started like any other thread, by calling start(). See the Java Concurrency tutorials, there is a sticky thread at the beginning of this forum.

0

1.No, main thread and daemon thread are different.
2.daemon thread means it will executed continously.
3.no
4.it doesn't require any main() method.
5.same as above
6. it will executed by using thread object..

0

1.No, main thread and daemon thread are different.
2.daemon thread means it will executed continously.

All threads are executed "continuously", until the thing it is doing is finished or the thread is interrupted.

3.no
4.it doesn't require any main() method.
5.same as above
6. it will executed by using thread object..

IOW, as already said, a daemon thread is no different from a standard user thread, other than the fact that a program will not wait for that thread to finish before exiting.

Edited by masijade: n/a

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.