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 locale?
How we can skip finally block of exception even if some exception occurs in the exception block in java?
Can we force garbage collector to run ?
What is immutable class in java?
What is regex java?
When do you call copy constructor?
What is literal example?
Give reasons supporting that string is immutable.
Difference between keyword and identifier.
What is covariant return type?
What is JDBC Driver interface?How can you retrieve data from the ResultSet
How is hashcode calculated in java?
Differentiate between postfix and prefix operators in java.
What is the use of java?
These static constructors are correct ? class A { statc intA() { } static A(int x,int y) { } static A(int x) { } }