Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


Can a thread be a member of another thread?

Answers were Sorted based on User's Feedback



Can a thread be a member of another thread?..

Answer / s.ramesh

import java.util.*;

public class DemoThread extends Thread {

private Thread t = null;

public DemoThread() {
t= new Thread(this, "RacingThread");
t.start();
}

public static void main(String[] args) {
DemoThread dt = new DemoThread();
dt.setName("DemoThread");
dt.start();
}
public void run()
{
while(true)
{
try
{
this.sleep(5000);
}
catch(Exception e)
{
System.out.println("Exception Occured");
}
}
}
}

Is This Answer Correct ?    2 Yes 0 No

Can a thread be a member of another thread?..

Answer / amalendra

A thread is the smallest executable unit in the system. It
means a thread can start another thread, but it can not be
a member of another thread.

Is This Answer Correct ?    1 Yes 1 No

Post New Answer

More Advanced Java Interview Questions

What is the use of Semaphore?

3 Answers  


What is difference RMI registry and OSAgent?

1 Answers  


What is UniCastRemoteObject and what is its use in RMI?

6 Answers  


iam writing the contents to a excel through I/O i am putting first statement as WRITE and then READ(from excel) immediately..later user complains that he is not getting the date by using READ ..wat could be the situation

3 Answers   iGate,


What exceptions are thrown by RMI?

1 Answers  


What state does a thread enter when it terminates its processing?

0 Answers  


If i learn Java, what kind of applications can i create that will help Banking, Retail, Hotel, Logistics industry.

2 Answers  


How are commas used in the intialization and iteration parts of a for statement?

0 Answers  


Can I run seam with jdk 1.4 and earlier?

0 Answers  


What is re-entrant. Is session beans reentrant. Is entity beans reentrant?

0 Answers  


whats is mean by connectionpooling

0 Answers   SolutionNET,


what is the diffrence between banking and insurance domain?

2 Answers  


Categories