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
What is the private method modifier?
What are the different types of java?
Which arithmetic operations can result in the throwing of an arithmeticexception?
Explain heap sort?
What is super keyword explain with example?
What are triggers in DB? Explain their types. How do they work?
What are keywords in programming?
What is e java?
Why declare Main() inside the class in java ?
What is user defined exception in Java?
How can I debug the Java security exceptions and AccessControlExceptions?
Explain how can you debug the Java code?
Can an anonymous class be declared as implementing an interface and extending a class in java programming?
What is equlas() and hashcode() contract in java? Where does it used?
What is the difference between a static and a non-static inner class in java programming?