Home Answers Viewqa Java-Beginners How to Differenciate Main Thread and Child Thread in Java

 
 


Praveen
How to Differenciate Main Thread and Child Thread in Java
1 Answer(s)      2 years and 3 months ago
Posted in : Java Beginners

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 Pages:
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
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
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
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
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
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
thread
thread  can parent thread be dead if child thread is not dead
Thread Creation
; In Java, an object of the Thread class can represent a thread. Thread... RunThread.java C:\j2se6\thread>java RunThread Thread...:\j2se6\thread>java DemoJoin Wait for the child threads to finish
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
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
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 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
Java thread
Java thread  How can a dead thread be restarted?  A dead thread cannot be restarted
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 Priorities
;    In Java, thread scheduler can use the thread...; When a Java thread is created, it inherits its priority from the thread.... Lets see, how to set and get the priority of a thread.   class MyThread1
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
Thread Priorities
Thread Priorities         In Java, thread scheduler can use the thread...; When a Java thread is created, it inherits its priority from the thread
Thread Priorities
Thread Priorities         In Java, thread scheduler can use the thread priorities... a Java thread is created, it inherits its priority from the thread
thread
thread  Hi what are the threads required to excute a programe except main threads? Thanks kalins naik
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
Overview of Thread
process.  Main Thread When any standalone application is running, it firstly execute the main() method runs in a one thread, called the main thread. If no other threads are created by the main thread, then program terminates
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 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 - Java Beginners
Java Thread  What is thread in Java? and how can i write a Java thread program?Thanks in advance!!  Hi friend,import javax.swing.*;import... BounceThread { public static void main(String[] args) { JFrame frame = new
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
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
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 dump
thread dump  Hi, I wanted to understand the Locked/waiting state below in the java thread dump. Is it normal to have waiting on locked object... help clarify on how to interpret these values waiting on <0x701dd1e0>
Exception in thread
Exception in thread   Hi, I have created a java file for sending...:\mail.jar SendMailTLSDFC Exception in thread "main" java.lang.NoClassDefFoundError... properly. But am unable to run this file using java command on command prompt. javac
Java Exception Thread
Java Exception Thread     ...( java.lang.thread) 2)Implement Runnable interface( java .lang. thread) Understand... to Overcome this Thread Exception in Java Program In the preceding code, we
Java Thread Join
Java Join method join the next thread at the end of the current thread After current thread stops execution then next thread executes. Java Join... void main(String[] args) throws Exception { join j1 = new join(); Thread
Java Thread Priorities
.style1 { font-size: medium; } Java Thread Priorities In this section, we will discuss how to set thread priorities with example. Thread...-to-run state. Thread having higher priority, execute first. Java priorities
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
sleep method in thread java program
sleep method in thread java program  How can we use sleep method in thread ?   public class test { public static void main(String...) { } } } } Output Delhi Bihar Goa Pune mumbai Description:- In this thread
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 related - Java Interview Questions
thread related  Hi, Plz tell me how two thread will communicate...() , notifyAl() methods. wait() method tells the thread to wait until another threads calls notify() method. The wait() method causes the current thread
Java Thread checkAccess
Java Thread checkAccess In this tutorial you will learn how to check permission of thread modification by using checkAccess () method. Thread checkAccess() : Thread class provides you to check the permission of thread modification
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
Thread priority in java
. Example : A program how to set or get priority of thread in java. class...Thread priority in java A thread is a part or entity of a  process... concurrently. In java each and every thread has priority , priority means which
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
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
closing thread for jdk1.5 or higher versions - Java Beginners
in thread "main" java.lang.NoSuchMethodError how can i destroy the thread and how...closing thread for jdk1.5 or higher versions  Hi All, I am using jdk1.5 and higher version of java. I tried to destroy thread by using
JAVA THREAD - Java Beginners
main(String ar[]) { Thread th = new Thread(new RunnableThread...JAVA THREAD  hii i wrote a pgm to print the numbers from 0 to 9 in 2...: class kj implements Runnable { public static void main(String ar[])throws
thread class - Java Beginners
thread class  Create 2 Thread classes.One Thread is Incrementor... value of cnt1 by 1 each time. The other thread is Decrementor which has variable... each time. - Incrementor thread increments value of cnt1 by one
Thread in java
Thread in java  which method will defined in thread class