What method is used to create the daemon thread?

Answer Posted / 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       View All Answers


Please Help Members By Posting Answers For Below Questions

What is a policy?

1772


How to determine SGA site?

1908


What is the map interface?

611


What event results from the clicking of a button?

695


Are enterprise beans allowed to use thread.sleep()?

647






Define prototype?

583


What are the different class loaders used by jvm?

597


Explain the steps in details to load the server object dynamically?

4540


Is a class a subclass of itself?

588


What happens when a thread cannot acquire a lock on an object?

537


Why are some of the class and element names counter-intuitive?

571


which book is better for jdbc ,servlets and jsp

1644


Name the class that is used to bind the server object with RMI Registry?

1692


What is re-entrant. Is session beans reentrant. Is entity beans reentrant?

580


What is Remote Server?

1682