1.

Which of these method is used to explicitly set the priority of a thread?(a) set()(b) make()(c) setPriority()(d) makePriority()The question was posed to me in an international level competition.The origin of the question is isAlive(), Join() & Thread Synchronization in division Multithreading of Java

Answer» RIGHT OPTION is (c) setPriority()

Easiest explanation: The default value of PRIORITY given to a thread is 5 but we can explicitly CHANGE that value between the permitted values 1 & 10, this is DONE by using the method setPriority().


Discussion

No Comment Found

Related InterviewSolutions