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
Is set ordered?
What is the flag in java?
What are user defined exceptions?
What is an interface in java? Explain
What is the advantage of preparedstatement over statement?
What is the super void?
Explain access specifiers?
What is the use of predicate in java 8?
how is final different from finally and finalize in java?
What is the difference between actual and formal parameters?
What is the difference between array list and vector in java?
Is alive in java?
What is a generic type?
How many types of memory areas are allocated by jvm?
What is the generic function?