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...

What is yielding and sleeping? how they different?

Answer Posted / ranganathkini

When a thread yields, its execution is paused and loses
ownership of the monitor lock giving other waiting threads a
chance to run.

When a thread sleeps, its execution is paused for the
specified duration during such an idle period, the thread
continues to retain the ownership of the monitor lock.

Is This Answer Correct ?    3 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How does hashset work in java?

1061


when to use ArrayList and when to use HashMap in webApplication.

4593


Which package is always imported by default?

1038


How to perform binary search in java?

948


Is alive in java?

900


Can we assign integer value to char in java?

963


Difference between character constant and string constant in java ?

962


What is finalize method?

1046


Why can't we make a class private in java?

979


What is array and arraylist in java?

1049


What is the dot operator?

943


Can you use this() and super() both in a constructor?

932


What is constructor chaining in java?

1020


If I only change the return type, does the method become overloaded?

876


How many bytes is 255 characters?

926