Comparison of yield(), join() and sleep() in Java Last Updated : 27 May, 2018 Improve Improve Like Article Like Save Share Report Comparison table yield(), join(), sleep() property yield() join() sleep() purpose If a thread wants to pass its execution to give chance to remaining threads of same priority then we should go for yield() If a thread wants to wait until completing of some other thread then we should go for join() If a thread does not want to perform any operation for a particular amount of time, then it goes for sleep() Is it overloaded? NO YES YES Is it final? NO YES NO Is it throws? NO YES YES Is it native? YES NO sleep(long ms)->native & sleep (long ms, int ns)-> non native Is it static? YES NO YES Like Article Suggest improvement Previous Java Thread Priority in Multithreading Next JSwing | Create a Magnifying tool using Java Robot Share your thoughts in the comments Add Your Comment Please Login to comment... Similar Reads Sleep mode vs Hibernate mode in Computer Java 11 - Features and Comparison Comparison between Height Balanced Tree and Weight Balanced Tree Assigning an integer to float and comparison in C/C++ Comparison Networks PostgreSQL - INNER JOIN Java.lang.Class class in Java | Set 1 Java.net.Authenticator class in Java Java.util.Objects class in Java Java lang.Long.builtcount() method in Java with Examples Like keep_silent Follow Article Tags : Misc Practice Tags : Misc Trending in News View More Otter.ai vs. Fireflies.ai: Which AI Transcribes Meetings More Accurately?Google Chrome Will Soon Let You Talk to Gemini In The Address BarAI Interior Designer vs. Virtual Home Decorator: Which AI Can Transform Your Home Into a Pinterest Dream Faster?Top 10 Free Webclipper on Chrome Browser in 2024 30 OOPs Interview Questions and Answers (2024) We use cookies to ensure you have the best browsing experience on our website. By using our site, you acknowledge that you have read and understood our Cookie Policy & Privacy Policy Got It ! Improvement Please go through our recently updated Improvement Guidelines before submitting any improvements. This article is being improved by another user right now. You can suggest the changes for now and it will be under the article's discussion tab. You will be notified via email once the article is available for improvement. Thank you for your valuable feedback! Suggest changes Please go through our recently updated Improvement Guidelines before submitting any improvements. Suggest Changes Help us improve. Share your suggestions to enhance the article. Contribute your expertise and make a difference in the GeeksforGeeks portal. Create Improvement Enhance the article with your expertise. Contribute to the GeeksforGeeks community and help create better learning resources for all. Suggest Changes Suggestion[CharLimit:2000] Create Improvement What kind of Experience do you want to share? Interview Experiences Admission Experiences Engineering Exam Experiences Work Experiences Campus Experiences Add Other Experiences Can't choose a topic to write? click here for suggested topics Write and publish your own Article