How to Differenciate Main Thread and Child Thread in Java

Ads
 

How to Differenciate Main Thread and Child Thread in Java

hi,

As a beginner in Java programming, I want to know What is the difference between Java Main Thread and Java Child Thread. Please Suggest any example or online link for references.

Thanks,

View Answers

March 17, 2011 at 10:59 AM

Hi,

There are two types of Thread used in Java Programming Language. These are Java Main Thread and the Child Thread. The Below reference will provides you clear idea of java thread concept.

http://www.roseindia.net/tutorial/java/thread/mainchild.html

Thanks,

Ads









Related Tutorials/Questions & Answers:
How to Differenciate Main Thread and Child Thread in Java
How to Differenciate Main Thread and Child Thread in Java  hi... Main Thread and Java Child Thread. Please Suggest any example or online link... in Java Programming Language. These are Java Main Thread and the Child Thread
difference between main thread and child thread?
difference between main thread and child thread?  any one give correct exact difference.   in jsp 7 implicit objects are available those are 1:response->This denotes the data included with the HTTP Response. 2
Advertisements
how to destroy java thread
how to destroy java thread  how to destroy java thread?   This will help .. Shutting Down the Java Thread
Java :Thread getPriority Example
Java :Thread getPriority Example In this tutorial you will learn how to get thread priority in java thread. Thread getPriority() : Thread scheduler uses thread priority concept to assign priority to the thread. A higher priority 
Java :Thread setPriority Example
Java :Thread setPriority Example In this tutorial you will learn how to set thread priority in java thread. Thread setPriority() : Thread scheduler uses..., Thread Priority : " + thread.getPriority()); } public static void main
Thread
Thread  Explain two ways of creating thread in java. Explain at three methods of thread class.   Java Create Thread There are two main... Create Thread There are two main ways of creating a thread. The first is to extend
Create Thread by Extending Thread
Create Thread by Extending Thread This section explain how to create thread by extending Thread class in java. Extending Thread : You can create thread...) { } /* Print info of main thread */ System.out.println(Thread.currentThread
java Thread
java Thread  what is purpose of Thread
Java Thread : getState() Example
Java Thread : getState() Example This section explains how to get state of a thread  in java Thread. Thread  getState() : Suppose you want to know the state of the thread so for that Java Thread provides Thread.getState
Java Thread Interrupted
Java Thread Interrupted In this tutorial, you will learn how to interrupt a thread with example in Java. Thread Interrupt : Java thread facilitate you... task after interruption or can terminate the thread. The main motive
Exception in thread "main" java.lang.ClassCastException
Exception in thread "main" java.lang.ClassCastException  I am trying.... Anyone help me please. Java Code: import java.sql.*; import org.postgis....){e.printStackTrace();} } } public static void main(String[] argv) { try { Class driver
Exception in thread "main" java.lang.ClassCastException
Exception in thread "main" java.lang.ClassCastException  I am trying.... Anyone help me please. Java Code: import java.sql.; import org.postgis....){e.printStackTrace();} } } public static void main(String[] argv) { try { Class driver
Java Thread : isAlive() method
Java Thread : isAlive() method In this tutorial you will learn how to use isAlive() method in java thread. isAlive() method : When you are running many threads ,java take long periods switching between threads , may be one
exception in thread main java.lang.unsupportedclassversionerror in ubuntu
exception in thread main java.lang.unsupportedclassversionerror in ubuntu  Hi, In Ubuntu I am trying to run Java program and its throwing exception. exception in thread main java.lang.unsupportedclassversionerror in ubuntu How
Java :Thread Join
Java :Thread Join In this tutorial you will see how to use join method in java thread. join() method - join method waits until the thread die. If we... InterruptedException if another thread try to interrupt current thread. join
Thread
Thread  Write a Java program to create three theads. Each thread should produce the sum of 1 to 10, 11 to 20 and 21to 30 respectively. Main thread....   Java Thread Example class ThreadExample{ static int
Thread
Thread  What is multi-threading? Explain different states of a thread.   Java Multithreading Multithreading is a technique that allows... processor system. States of Thread: New state ? After the creations of Thread
Thread
main(String [] args) { MyThread m=new MyThread("Thread Started... to the thread constructor eventhough we had created only one thread and if you say we have added to point to the current thread then why we have not added
exception in thread main java.lang.unsupportedclassversionerror in eclipse
exception in thread main java.lang.unsupportedclassversionerror in eclipse .... But it throws exception in thread main java.lang.unsupportedclassversionerror in eclipse How to resolve this? Thanks   Hi, This error comes with you
Thread
Thread  Thread Life Cycle
Thread
Thread  what is the use of thread
Thread
Thread  class Extender extends Thread { Extender(Runnable run...(); } public void run(){ System.out.println("Extender Thread is Started :"); //new Thread(new Implementer()).start(); } } class Implementer
Thread
=" + i); } public static void main(string args[]) { A a = new A(); Thread t = new thread(a); t.start(); } } Is it possible to run above program with out...Thread  will this code work..? class A extends Thread { public
Java Thread
Java Thread In this tutorial we will discuss about Java Thread. Java Thread : A thread is light weight java program.JVM permits you to have multiple threads for concurrent execution. Each thread has priority. You can also set
Java :Thread Synchronization
Java :Thread Synchronization This section explains how to use concept of synchronization in java Thread. Thread Synchronization : . Java supports multi... of program. So for the multi-threaded application, synchronization of java
Java Thread HoldsLock
Java Thread HoldsLock In this tutorial, you will learn how to lock a thread with example in Java. Thread HoldsLock  : It is easy to use...): This method returns true if the current thread holds the monitor lock
Thread
Thread  what happen when we call the Wait(),Notify() and NotifyAll() methods in the Thread
java thread program
java thread program  write a java program to find out the current running thread in a java program   public class RunningThreads{ public static void main(String[] args) { ThreadGroup group
java thread program
java thread program  write a java program to find out all the current running thread in a java program   public class RunningThreads{ public static void main(String[] args) { ThreadGroup group
Thread
Thread   there are two threads running at a time.. when am updating a values in database. both thread halt and stop for moment till it get updated into database... so i dnt want thread to get halts for tht moment of period. whats
Java Thread : setDaemon() method
Java Thread : setDaemon() method In this section we are going to describe setDaemon() method with example in java thread. Daemon Thread  : In Java... = 3 Thread name : Thread-0 Thread name : Thread-1 Thread name : main

Ads