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 / ravikiran

yield() method will suspend all the same priority thread
which is running and gives chance to next thread to run
which is of the same priority
sleep() method will make the thread to sleep for a
particular period of time which is specified in the
argument list

Is This Answer Correct ?    1 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Java is pass by value or pass by reference? Explain

994


Why to use nested classes in java? (Or) what is the purpose of nested class in java?

1074


What is the difference between normal report & matrix report?

1111


why not override thread to make a runnable? : Java thread

1008


What is meant by distributed application? Why are we using that in our application?

947


What are the parts of a method?

983


How do you start a new line in java?

988


Which class is the superclass for all the classes?

1021


What are the advantages of java over C++?

1201


Explain about interthread communication and how it takes place in java?

1026


what is the swingutilities.invokelater(runnable) method for? : Java thread

1044


What is valid keyword in java?

1002


Define "Access specifiers" in java.

1174


Is singleton a bad practice?

1051


What are data types in programming?

997