Can we call the Thread.sleep in Synchyronozed block?
Answer Posted / veerendra
While the thread is sleeping in a synchronised block means,
you are locking a resource, there might be 'n' number of
contenders for this resources. If the thread goes to sleep
then other threads or processes contending for the resource
will be blocked infinitely.
| Is This Answer Correct ? | 8 Yes | 1 No |
Post New Answer View All Answers
what is the significance of listiterator in java?
What is the generic class?
What is scope & storage allocation of static, local and register variables? Explain with an example.
Can you use abstract and final both with a method?
What is consumer in java?
What is nextline method in java?
What is a variable declaration?
Can a class have multiple constructors?
Explain the JDB in depth & command line.
What does int argc char * argv [] mean?
Why can we not override static method?
What's the purpose of static methods and static variables?
What is the use of object and class classes?
What is a class component?
Explain the difference between runnable and callable interface in java?