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 the difference between sleep() and Wait()?

Answer Posted / deepak divvela

The main difference is if we need the thread wants to block
particular period of time we just choose sleep().
and when the thread called wait() means it will blocked
untill we will call notify(),notifyAll();

Is This Answer Correct ?    49 Yes 14 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How do you read a char in java?

948


Can a class be declared as static?

1107


What is a priority queue java?

927


How you can force the garbage collection?

929


What are the types of exceptions?

988


What is a lambda expression ? What's its use ?

1047


What is computer compiler?

936


When does a class need a virtual destructor?

949


What is the list interface?

1039


Can you add null to a list java?

997


Define inheritance?

963


How can you make a class serializable in java?

940


What is the difference between the font and fontmetrics classes in java programming?

1025


Can we declare main () method as non static?

916


Differentiate jar and war files?

978