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
How big is a gigabyte?
What is a method vs function?
How big is a 32 bit integer?
I want to control database connections in my program and want that only one thread should be able to make database connection at a time. How can I implement this logic?
What is t type java?
How can we create a synchronized collection from given collection?
what is an objects lock and which objects have locks? : Java thread
What does it mean that strings are immutable?
What are the types of exceptions?
Why do we use bufferedreader?
How do you start a new line in java?
What are different access specifiers in java?
Can we inherit a class with private constructor?
What are the types of arrays in java?
What is difference between class and object in java?