Comment on Tutorial - wait(), notify() and notifyAll() in Java - A tutorial By Jagan



Comment Added by : ron

Comment Added at : 2010-03-30 01:37:12

Comment on Tutorial : wait(), notify() and notifyAll() in Java - A tutorial By Jagan
Really a great article!
I have some questions/suggestions:
Shouldn't be the wait-calls be inside a loop to account for spurious wakeups? (see http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html#wait())
Also, I would put the rest of the code after the wait() also into the try-block, because i wouldn't want it to be executed after an InterruptedException.


View Tutorial



Subscribe to Tutorials

Related Tutorials

Program using concept of byte long short and int in java

Update contents of a file within a jar file

Tomcat and httpd configured in port 8080 and 80

Java File

Java String

Count number of vowels, consonants and digits in a String in Java

Reverse a number in Java

Student marks calculation program in Java

Handling Fractions in Java

Calculate gross salary in Java

Calculate average sale of the week in Java

Vector in Java - Sample Program

MultiLevel Inheritance sample in Java

Multiple Inheritance sample in Java

Java program using Method Overriding

Archived Comments

1. Hi,
I am Mahesh. i want to sending sms cod

View Tutorial          By: Mahesh at 2011-05-20 05:24:22

2. Hi..thx for the hadoop info..i m learning hadoop..
View Tutorial          By: Kirti at 2015-10-26 11:42:02

3. w0w amazing
View Tutorial          By: elvin at 2009-01-05 01:00:13

4. Thanks a lot for valuable program.


View Tutorial          By: Kailash at 2012-07-30 10:09:12

5. its good,,,can it be done more simpler without usi
View Tutorial          By: gahanaatherya at 2013-10-14 11:50:02

6. Small modification.
System.out.println(&qu

View Tutorial          By: Rohit at 2012-02-07 16:22:52

7. Sir, can i execute the program from windows enviro
View Tutorial          By: krishna at 2014-04-08 07:05:30

8. This example is working fine....I think BillGates
View Tutorial          By: Monoj Rath at 2010-07-15 01:27:51

9. Can you explain with increment and decrement opera
View Tutorial          By: Sathish Kumar at 2013-09-01 07:40:42

10. I could not understand, anyone having an easier ex
View Tutorial          By: aatish at 2011-09-14 09:52:28