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. how to write an byte array containing 10 different
View Tutorial          By: sanjana at 2015-01-17 06:32:41

2. what items do i add?
View Tutorial          By: Camo at 2015-09-30 23:02:10

3. oh tnx a lot!i'v been lookin for a code like this!
View Tutorial          By: LES at 2012-01-13 12:55:09

4. Good examples. However... I am testing for a Hex v
View Tutorial          By: Doug Whitehead at 2008-11-29 17:10:43

5. i got an error msg at runtime of jdbc program with
View Tutorial          By: madhu sudan at 2012-06-17 02:52:53

6. You can not overload the private method in Test cl
View Tutorial          By: Gaurav at 2013-07-28 15:53:20

7. I want to change software of micromax x455 mobile
View Tutorial          By: Sachin at 2012-12-29 09:39:58

8. Hi

I want the java code for i

View Tutorial          By: Deepak at 2015-07-29 15:07:09

9. Hi! Ramlak It Working But Sms didnot send why? and
View Tutorial          By: balaji at 2008-01-28 02:41:47

10. Hi,
Its good but you can make it more bette

View Tutorial          By: vishakha sharma at 2010-12-15 06:14:52