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 alos faced the same problem o

View Tutorial          By: prasanna kumar v at 2010-05-15 02:55:59

2. Very very nice example thank you
View Tutorial          By: Fabrice at 2010-12-03 03:36:18

3. Hi thanks for the example for overriding toString(
View Tutorial          By: Reshma at 2011-05-11 10:46:08

4. Oh! Emiley, thank you very much! There are two lo
View Tutorial          By: Alexey at 2009-04-09 14:17:31

5. It's very useful..I like u
View Tutorial          By: jeeva at 2008-04-03 23:58:41

6. Hey there, I was needing something exactly like th
View Tutorial          By: Jeffry at 2013-03-26 03:33:27

7. Daniel Jonsson, you should be thankful to this art
View Tutorial          By: dole at 2011-11-12 06:44:42

8. It's so crazy to the adventures of J2ME side and w
View Tutorial          By: jaikarthik at 2009-01-18 23:42:42

9. Thank You So Much . .. .. .
Very Nice Expl

View Tutorial          By: salman at 2012-07-05 13:22:11

10. Just used InstallCert.java successfully so that my
View Tutorial          By: Anthony Pelosi at 2009-12-30 15:52:17