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

What does sprintf mean?

930


Does anyone still use java?

1097


How do I enable java in safari?

1015


What is byte data type?

981


Can a class be private?

947


What is the implementation of destroy method in java. Is it native or java code?

947


Write the algorithm to check the number non-leaf nodes in a tree.

1050


Explain public static void main(string args[]) in java.

968


How do you escape sequences in java?

1060


What is a literal coding?

1008


Can you instantiate the math class in Java?

1074


Can we declare a static variable inside a method?

984


when should you use stringbuilder class in a program?

965


What is final method?

1042


When is the finalize() called? What is the purpose of finalization?

1059