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
Why singleton class is used in java?
How do you get the length of a string in java?
What are the restrictions that are applied to the java static methods?
What do you understand by an io stream?
How to write custom exception in java?
What is the purpose of the file class in java programming?
What do you mean by stream pipelining in java 8?
What is a class reference?
What is a text string?
Which package is always imported by default?
List some java keywords sun like c, c + + keywords?
Can we have this () and super () together?
What does the string method compareto () do?
Can we return null in java?
How many java versions are there?