How many types of thread in java? give the name

Answer Posted / vivek

There are two types of threads in JAVA i.e.
1) User Thread :- This thread is created by user program
itself e.g. Main thread.

2) Daemon Thread:- This is JVM itself generated thread.
Example of this thread is Thread Scheduler and Garbage Collector

Is This Answer Correct ?    50 Yes 12 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Can each java object keep track of all the threads that want to exclusively access it?

763


What are the different ways of implementing thread? Which one is more advantageous?

778


What is java lang string?

784


Difference between predicate, supplier and consumer ?

826


how to know the total memory occupied by the objects in the ArrayList(Array list may contain duplicate objects)

2136


What is the difference between integer parseint and integer valueof?

782


What is class and object in java?

785


Is there any way to find whether software installed in the system is registered by just providing the .exe file? I have tried the following code but its just displaying the directory structure in the registry. Here the code : package com.msi.intaller; import java.util.Iterator; import ca.beq.util.win32.registry.RegistryKey; import ca.beq.util.win32.registry.RootKey; public class RegistryFinder { public static void main(String... args) throws Exception { RegistryKey.initialize(RegistryFinder.class.getResource("jRe gistryKey.dll").getFile()); RegistryKey key = new RegistryKey(RootKey.HKLM, "Software\\ODBC"); for (Iterator subkeys = key.subkeys(); subkeys.hasNext();) { RegistryKey subkey = subkeys.next(); System.out.println(subkey.getName()); // You need to check here if there's anything which matches "Mozilla FireFox". } } }

1571


What is reverse function?

811


Why is method overloading not possible by changing the return type in java?

807


Is there is any difference between a scrollbar and a scrollpane?

789


Why Set interface contains unique elements, what internally implemented for this so that it contains unique elements?

7769


Give few examples of final classes defined in Java API?

930


What are the major advantages of internal iteration over external iteration?

852


What is overloading and overriding in java?

945