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

Can private method static?

918


Assume a thread has lock on it, calling sleep() method on that thread will release the lock?

1104


Where is core java used?

1012


What is a protected method?

1142


What is the this keyword?

1030


What is the use of parseint in java?

1022


Explain notify() method of object class ?

1103


What is a top level class in java?

1028


What is tree in java?

919


Can we increase size of array?

1027


Can we call the constructor of a class more than once for an object?

1095


How does thread synchronization occurs inside a monitor?

1099


What is the platform?

1002


What data structures are used to perform recursion?

1052


What access modifiers can be used for class ?

1021