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 are the advantages of JTA over JTS?

0 Answers  


Why are some of the class and element names counter-intuitive?

0 Answers  


Hi I have joined java course. I also want additional help from any tutorials website. Please suggest me tutorials which provides easy to understand online applet tutorials?

0 Answers  


What modifiers may be used with an inner class that is a member of an outer class?

0 Answers  


what is difference between object state and behaviour?

3 Answers  


what is heepStored?

1 Answers  


How do you iterate in Hashmap?

1 Answers   HCL, Infotech,


what is default length of textfield ?

1 Answers  


What are the diff types of exception?

0 Answers  


What is the difference between the font and fontmetrics classes?

0 Answers  


Why is actionform a base class rather than an interface?

0 Answers  


What are local interfaces? Describe.

0 Answers  


Categories