adspace


Which method is used to create the daemon thread?

Answer Posted / Nitesh Nayal

In Java, a thread can be made a daemon by setting its daemon status to true using the `setDaemon()` method. Daemon threads are used for background tasks and do not prevent the JVM from exiting when all non-daemon threads have finished.

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the java api?

999


Can we extract main method from another class?

1035


What do you understand by casting in java language? What are the types of casting?

924


What is the locale class?

1027


What if I write static public void instead of public static void?

938


what is reflection api? How are they implemented?

1106


How does java handle integer overflows and underflows?

1116


What is the resourcebundle class?

1013


Are jvm’s platform independent?

984


What is the first argument of the string array in main method?

1031