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

Explain phantom read?

0 Answers  


What is local interface. How values will be passed?

0 Answers  


What is UniCastRemoteObject and what is its use in RMI?

6 Answers  


What is the difference between the font and fontmetrics classes?

0 Answers  


Which containers use a border layout as their default layout?

0 Answers  


why static class in java

0 Answers   Infotech, SunGard,


What are the high-level thread states?

1 Answers  


how i secure my site with the https protocol.what are the steps?

0 Answers  


How task's priority is used in scheduling?

0 Answers   HCL,


In our urls and in the text of the buttons we have comma. Its causing an error. Is there a way to change the delimiting character for the menu arguments?

0 Answers  


Why doesn’t the focus feature on the tag work in every circumstance?

0 Answers  


Connection Pooling with different type of databases?

1 Answers  


Categories