File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Threads

 
jaya S K
Greenhorn
Posts: 20
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 81
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

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
Posts: 20
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Anupreet
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic