Can we call the Thread.sleep in Synchyronozed block?
Answer Posted / muthusenthil
yes, you can call wait method inside synchronized block but
synchronized block usually allows one by one to penetrate
in.if you call wait method inside it will create a stagnant
circumstance. synchronized block wont allow other threads
inside till this thread in waiting state get notified
Is This Answer Correct ? | 2 Yes | 2 No |
Post New Answer View All Answers
Is 0 a prime number?
Which eclipse is best for java?
Can we use string in switch case in java?
How can I right-justify a string?
What are the important features of Java 11 release?
Which one of the following suits the description of a string better: derived or primitive?
Why declare Main() method as a static in java ?
What is the meaning of variable in research?
Can keyword be used as identifier?
Does anyone still use java?
What is the difference between choice and list?
What about instanceof operator in java?
What is purpose of keyword void?
What is meant by vector class, dictionary class, hash table class, and property class?
Is jdk required on each machine to run a java program?