How to Differenciate Main Thread and Child Thread in Java

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,









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... Language. These are Java Main Thread and the Child Thread. The Below reference
Main Thread and Child Thread
and Child Threads used in Programming. Main thread is automatically created when program runs. Child Thread gets created by the main thread . Java Main... 1 this thread is main 1 this thread is Child 2 this thread is Child 3
Advertisements
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
how to destroy java thread
how to destroy java thread  how to destroy java thread?   This will help .. Shutting Down the Java Thread
thread
thread  can parent thread be dead if child thread is not dead
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
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
Java thread  How can a dead thread be restarted?  A dead thread cannot be restarted
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 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 
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... main(String[] args) { Thread thread1 = new Thread(new ThreadClass(), "Hello
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 concept to assign priority to the thread. A higher priority 
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
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
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 unsupported major.minor version 50.0 - Java Beginners
!"); } } for example: javac xxx.java-->comping java xxxx:error :exception in thread main...exception in thread main java.lang.unsupportedclassversionerror unsupported... getting the this error :exception in thread main
java Thread
java Thread  what is purpose of Thread
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
exception in thread main java.lang.unsupportedclassversionerror unsupported major.minor version 50.0 - Java Beginners
exception in thread main java.lang.unsupportedclassversionerror unsupported... is compling but runtime i am getting the exception in thread main.... java -version java version "1.4.2_06" javac -version java version
Java thread
Java thread  What's the difference between a thread's start() and run() methods
Java thread
Java thread  What is the difference between process and thread
Java thread
Java thread  What invokes a thread's run() method
Java thread
Java thread  What are the ways in which you can instantiate a thread
Java thread
Java thread  What are the high-level thread states
Java Sleep Thread
Java Thread sleep() is a static method. It sleeps the thread for the given time in milliseconds. It is used to delay the thread. It is used in Applet or GUI programming for animation Java Sleep Thread Example public class
Thread in java
Thread in java  which method will defined in thread class
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
Java thread  Why do threads block on I/O?   When a thread... and in that time some other thread which is not waiting for that IO gets a chance to execute.If any input is not available to the thread which got suspended for IO
Thread
Thread  what happen when we call the Wait(),Notify() and NotifyAll() methods in the Thread
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...("Is Thread alive ? - " + thread.isAlive()); } public static void main(String
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 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.ADS_TO_REPLACE_1
Java Thread class
Java Thread Class is a piece of the program execution Java has... It is created by extending the Thread class or implementing Runnable interface Java...("This is thread " + i); } } public static void main(String[] args
Java Thread and Runnable
Java Thread and Runnable  What's the difference between Thread and Runnable types
thread
thread  Hi what are the threads required to excute a programe except main threads? Thanks kalins naik
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
Thread
Thread  Explain the use of throw and throws keywords.   Java throw and throws Whenever we want to force an exception then we use throw... a possible exception then we use throws keyword. Point to note here is that the Java
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
exception in thread main while running servlet
exception in thread main while running servlet  I got exception in thread main no such method error while running servlet. I have added servlet.api.jar file in classpath.my classpath is C:\Program Files\Apache Software Foundation
Thread - Java Beginners
the concept of thread, thread creation and use of threads in JAVA application?  Thread creation and use of threads in JAVA Java Resourcehttp://www.roseindia.net/java/thread/thread-creation.shtml
Java thread state
Java thread state  what is Static binding
Java :Thread Synchronization
Java :Thread Synchronization This section explains how to use concept of synchronization in java Thread. Thread Synchronization : . Java supports multi... void main(String[] args) { Sync t1=new Sync("Thread 1 : "); t1.start
Java thread lock
Java thread lock  What happens when a thread cannot acquire a lock on an object
Java Thread Priority
Java Threads run with some priority There are Three types of Java Thread...() method. Java Thread Priority Example public class priority implements...().getName()); } public static void main(String[] args) { Thread t1 = new
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

Ads