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 permgen or permanent generation?

578


What is the map interface?

604


How messaging services are done, before release of JMS?

1580


A user of a web application sees a jsessionid argument in the URL whenever a resource is accessed. What does this mean? a. The form must have the field jsessionid b. URL rewriting is used as the session method c. Cookies are used for managing sessions

1808


Difference between new operator and class.forname().newinstance()?

593






Is jvm a overhead?

616


How to determine SGA site?

1901


What is the difference between a menuitem and a checkboxmenuitem?

576


What is the relationship between an event-listener interface and an event-adapter class?

549


what is the use of State Factories?

1903


Whats new with the stop(), suspend() and resume() methods in jdk 1.2?

575


For which statements does it make sense to use a label?

580


What are the different methods of identifying an object?

564


What method is invoked to cause an object to begin executing as a separate thread?

564


To what value is a variable of the string type automatically initialized?

601