difference between wait and sleep in java

0 votes
I am confused between the wait() and sleep() in Java related to threads. Seems similar. Are they? If not what is the difference?
Apr 25, 2018 in Java by Akrati
• 3,190 points
1,257 views

1 answer to this question.

0 votes

We can find a big difference between sleep/interrupt and wait/notify

 

answered Apr 26, 2018 by developer_1
• 3,350 points

Related Questions In Java

0 votes
2 answers

What is the difference between Set and List in java?

List is an ordered sequence of elements. ...READ MORE

answered Apr 26, 2018 in Java by Akrati
• 3,190 points
63,389 views
0 votes
1 answer

What's the difference between SoftReference and WeakReference in Java?

Weak references A weak reference, simply put, is a ...READ MORE

answered Jun 12, 2018 in Java by Rishabh
• 3,620 points
2,002 views
0 votes
2 answers

What is the difference between getAttribute() and getParameter() in java?

getParameter() returns http request parameters. Those passed from ...READ MORE

answered Aug 28, 2019 in Java by Sirajul
• 59,230 points
22,625 views
0 votes
2 answers

What is the difference between Type List and type ArrayList in Java

By List, you actually tell, that your object ...READ MORE

answered Aug 28, 2019 in Java by Sirajul
• 59,230 points
2,599 views
0 votes
1 answer

What is the difference between Runnable and extends Thread

Runnable is the preferred way to create ...READ MORE

answered May 1, 2018 in Java by sharth
• 3,370 points
1,190 views
0 votes
2 answers
0 votes
1 answer

Gracefully stopping a java thread

The preferable way will be to use a ...READ MORE

answered Aug 21, 2018 in Java by anto.trigg4
• 3,440 points
1,371 views
0 votes
2 answers

Does Java thread.sleep() puts swing ui to sleep?

You are correct about the code putting ...READ MORE

answered Oct 24, 2018 in Java by Sushmita
• 6,920 points
5,160 views
0 votes
2 answers

Converting between java.time.LocalDateTime and java.util.Date

Try this: Date in = new Date(); LocalDateTime ldt ...READ MORE

answered Aug 27, 2019 in Java by Sirajul
• 59,230 points
2,922 views
0 votes
3 answers

Check if a String is numeric in Java

Java 8 Lambda Expression is used: String someString ...READ MORE

answered Sep 3, 2018 in Java by Daisy
• 8,140 points
3,739 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP