What kind of thread is the Garbage collector thread is?

Options
- Non daemon thread
- Daemon thread
- Thread with dead state
- None of the above


CORRECT ANSWER : Daemon thread

Discussion Board
Test

Good

Sat 10-3-2014 03:30 PM

Daemon Thread for garbage collection

Daemon threads are service providers for other threads or objects that are running in the same process as daemon thread. It supports background tasks and only needed while normal threads are executing. It is used in garbage collection mechanism as when the normal threads don't run and remaining threads are daemon threads then the interpreter of the program exits. Example: HotJava browser uses up to four daemon threads named "Image Fetcher" to fetch images from the file system or network for any thread that needs one. In daemon thread JVM will only shut down a program when all user threads have terminated.

Rohit Sharma 07-28-2014 12:48 AM

Write your comments


Enter the code shown above:

(Note: If you cannot read the numbers in the above image, reload the page to generate a new one.)


Advertisement