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,150 points
52 views

1 answer to this question.

0 votes

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

 

answered Apr 25, 2018 by developer_1
• 3,280 points

Related Questions In Java

0 votes
1 answer

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,150 points
63 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,540 points
114 views
0 votes
1 answer

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

getParameter() - getParameter will return the value of ...READ MORE

answered Jun 29, 2018 in Java by Perry
• 17,010 points
366 views
0 votes
1 answer

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

Always TypeList is preferred over ArrayList. The ...READ MORE

answered Jul 9, 2018 in Java by Akrati
• 960 points
44 views
0 votes
1 answer

What is the difference between Runnable and extends Thread

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

answered Apr 30, 2018 in Java by sharth
• 3,320 points
79 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 20, 2018 in Java by anto.trigg4
• 3,420 points
28 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,840 points
316 views
0 votes
1 answer

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

Here is what I came up with ...READ MORE

answered Feb 6 in Java by developer_1
• 3,280 points
100 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,040 points
558 views