1) There are 10 different threads in runnable state. Each
having priority 1 to 10. How does the CPU schedules or
executes these threads?
Answer Posted / karthik
We are not sure about when a thread runs it depends upon the
thread scheduler which can able to run a thread at any time
so the priorities are not sure even if we use the
setpriority method for a thread : ref scjp book thread chapter
| Is This Answer Correct ? | 10 Yes | 3 No |
Post New Answer View All Answers
What is the difference between replace and replace all?
What are different data types?
What is the difference between abstract classes and interfaces?
What is a super method?
What is the reflection?
What is meant by design patterns?
What is run time allocation?
What is the format specifier?
Are the imports checked for validity at compile time? Will the code containing an import such as java.lang.abcd compile?
Which number is denoted by leading zero in java?
What is substring 1 in java?
Differentiate between stringbuffer and string?
why would you use a synchronized block vs. Synchronized method? : Java thread
How do you find the maximum number from an array without comparing and sorting?
What are dot operator queries?