Win a copy of TensorFlow 2.0 in Action this week in the Artificial Intelligence and Machine Learning forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Paul Clapham
  • Bear Bibeault
  • Jeanne Boyarsky
Sheriffs:
  • Ron McLeod
  • Tim Cooke
  • Devaka Cooray
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Jj Roberts
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • salvin francis
  • Scott Selikoff
  • fred rosenberger

thread priority

 
Ranch Hand
Posts: 112
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,
This question is from a Mock test.
How can u set the Priority of a Thread ?
a. Using the setPriority() method in the class Thread/
b. Give the priority as a parameter to the constructor of the thread.
c. A thread can have priority from 1 to 10.
d. Thread priorities are given by the OS.
e. None of the above.
I choose a, c, d.
But the answer is only a, d. But why is c wrong..... any help ?
Thx in advance.
Aruna
 
Ranch Hand
Posts: 98
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi
What is the question,is it select all the correct answers (or) how do you set the priority of the thread,if it is the former your answer is correct and if the question is only about setting the prorities then i think the given answers make sense,what do you think?
Surya
 
Aru
Ranch Hand
Posts: 112
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Surya,

I think u r right......
have to read the question more carefully......
Thx
 
reply
    Bookmark Topic Watch Topic
  • New Topic