aspose file tools*
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes Death of a thread Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "Death of a thread " Watch "Death of a thread " New topic
Author

Death of a thread

Deepali Pate
Ranch Hand

Joined: Mar 20, 2002
Posts: 114
Death of a thread can occur
When exception is thrown
System.exit(0) is called
and run() ends
are all these satements true.
Threads have parent-child relationship is this true or false
Amir Ghahrai
Ranch Hand

Joined: Jun 19, 2002
Posts: 110
They are all true,
since once you call System.exit(0), it terminates the execution of the main thread from which your child threads have been spawned, therefore they die too.
all threads that have been spawned from the main thread, they inherit the main thread priority, therefore there is a relation between parent and child thread.
HTH


Amir
Deepali Pate
Ranch Hand

Joined: Mar 20, 2002
Posts: 114
This ? at this link.
http://www.tipsmart.com/studytools/selfreview/threads.htm
Q10. State which of the following statements are True.
(1) Concurrent Java programs can exhibit deterministic behavior, by providing mechanisms for synchronizing.
(2) Threads have parent-child relationships.
(3) When the thread is created, it is not yet active
SKIP THE QUESTION
1 and 3
All 3
1 and 2
Deepali
gives answer is is 1 and 3 when i think all 3 are true.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Death of a thread