What method is used to create the daemon thread?



What method is used to create the daemon thread?..

Answer / ranganathkini

the Thread.setDaemon() has to be invoked. It takes one
boolean param indicating if the thread is a daemon thread
or not. the setDaemon() has to invoked before the start()
method is called on the thread, else an
IllegalThreadStateException is throw indicating that the
thread is active and its daemon state cannot be altered.

Is This Answer Correct ?    5 Yes 0 No

Post New Answer

More Advanced Java Interview Questions

Can you give me a simple example of using the requiredif validator rule?

0 Answers  


What is waiting state? In what ways a thread can enter into waiting state?

2 Answers   Wipro,


what is default length of textfield ?

1 Answers  


What is diffennce between AWT & SWING?

4 Answers  


what are JSP tags? what is difference between include action and directory?

0 Answers   ADP,






Explain about thread synchronization inside a monitor?

0 Answers   Saksoft,


How to get an image from db2 database plz help as soon as possible

1 Answers  


Wt is the main difference between Java and Java J2EE and Advanced java?

5 Answers   Wipro,


What is thread deadlock? How to resolve thread deadlock?

3 Answers  


what is handle?

0 Answers  


Will it be called overriding if I do not change the parameters or return type, instead throw a different exception in the method signature.

4 Answers   HeadStrong,


What you mean by COM and DCOM?

0 Answers  


Categories