Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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


Please Help Members By Posting Answers For Below Questions

What is locale?

1010


How we can skip finally block of exception even if some exception occurs in the exception block in java?

928


Can we force garbage collector to run ?

1041


What is immutable class in java?

924


What is regex java?

1077


When do you call copy constructor?

957


What is literal example?

934


Give reasons supporting that string is immutable.

930


Difference between keyword and identifier.

1010


What is covariant return type?

1107


What is JDBC Driver interface?How can you retrieve data from the ResultSet

2086


How is hashcode calculated in java?

1010


Differentiate between postfix and prefix operators in java.

1109


What is the use of java?

940


These static constructors are correct ? class A { statc intA() { } static A(int x,int y) { } static A(int x) { } }

1070