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
How to make a class or a bean serializable?
What is array initialization in java?
Why arraylist is not synchronized in java example?
Is double bigger than float?
Which is fastest collection in java?
Is Java a dying language?
How can a gui component handle its own events?
How do you remove all elements from an arraylist in java?
What is stringwriter?
What is the java virtual machine?
Does java isempty check for null?
What are the major advantages of internal iteration over external iteration?
explain different ways of using thread? : Java thread
Can we change the value of static variable?
How to obtain a performance profile of java program