File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes Threads Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "Threads" Watch "Threads" New topic
Author

Threads

jaya S K
Greenhorn

Joined: Aug 18, 2003
Posts: 20
Hi
Can anyone give example for the following.
"A thread inherits its priority from the thread it created it"

Thanks
jaya
Anupreet Arora
Ranch Hand

Joined: Jun 17, 2003
Posts: 81

The output is:
SimpleThread --> Name is :main
SimpleThread --> Priority is :5
SimpleThread1 --> Name is :Thread1
SimpleThread1 --> Priority is :5
Changing Priority
SimpleThread1 --> Priority is :8
In SimpleThread2 --> Name is :Thread2
In SimpleThread2 --> Priority is :8

Hi Jaya,
The above example should make things quite clear.
Regards,
Anupreet
jaya S K
Greenhorn

Joined: Aug 18, 2003
Posts: 20
Thanks Anupreet
 
Consider Paul's rocket mass heater.
 
subject: Threads