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

Is “abc” a primitive value?

0 Answers  


What is the diffrence between a local-tx-datasource and a xa-datasource? Can you use transactions in both?

0 Answers  


What is J2EE?

2 Answers  


can a static method be overridden

41 Answers   IBM, SolutionNET,


what is disadvantage of thread?

3 Answers   HCL,






what is the diffrence between banking and insurance domain?

2 Answers  


How is a java object message delivered to a non-java client?

0 Answers  


Why a client should be multithreading? Explain.

0 Answers  


What is private static final long serialVersionUID = 1L;

3 Answers   Google,


What is a class loader?

0 Answers  


What are the states associated in the thread?

3 Answers  


Explain RMI Architecture?

0 Answers  


Categories