Javatpoint Logo

Example of priority of a Thread

By: svjava*** On: Sat May 20 02:49:03 IST 2017     Question Reputation0 Answer Reputation0 Quiz Belt Series Points0  0Blank User
when I compiled and run the example problem of priority of a thread. I got different results as output other than the output which is displayed on main page. Please help me to understand better.

Thank you
Up0Down
core java  x  328Tags

 
if you are using online IDE, this will cause some functional degradation..

Better you will do with your system IDE Like Eclipse and Net Beans..

And technically "initially every thread has a priority 5 as a default"..The priority of the thread differentiate form 1-10.. So if u didn't set a priority default it as 5.. so in execution phase, for which thread you created the object first that will run first..

Thank You!!-:)
Image Created0Down

By: [email protected] On: Mon Jun 05 18:46:00 IST 2017 Question Reputation0 Answer Reputation0 Belt Series Points0 0User Image
Are You Satisfied :0Yes0No