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



Comment Added by : sumit

Comment Added at : 2014-10-30 08:14:55

Comment on Tutorial : wait(), notify() and notifyAll() in Java - A tutorial By Jagan
You are using "this" to start to the thread before constructor has completed. Isn't it a wrong practice to use incompletely initialize objects by letting them escape before constructor completes-
Producer(Q q) {
this.q = q;
new Thread(this, "Producer").start();
}


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. It's a useful explanation, but i wanna known how c
View Tutorial          By: Noe Marin at 2008-01-25 13:27:57

2. nice effort
View Tutorial          By: Tiger at 2011-07-06 02:17:13

3. It is simply good and more informative
View Tutorial          By: ARUNA at 2011-06-19 06:32:29

4. thanks for your code
could you send me the

View Tutorial          By: nocturne at 2009-01-09 01:57:05

5. sir... i made a program just like that ... but the
View Tutorial          By: David at 2010-07-08 03:34:13

6. Hi All,
I can send sms successfully from Wi

View Tutorial          By: henrynawaung at 2008-11-14 06:41:13

7. superb superb maza aggaya maza aggaya
View Tutorial          By: pramodh at 2012-04-16 05:21:54

8. Plz show me how to use main method reccurssively p
View Tutorial          By: Jyoti Bankar at 2011-07-14 10:31:53

9. Very helpful and easily understandable!
View Tutorial          By: Teerna at 2014-11-12 23:55:49

10. HI all i would like to send the result of " I
View Tutorial          By: FLORIAN at 2011-09-14 09:04:42