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. really helpul........
pls mail me some more

View Tutorial          By: senthil at 2013-08-19 17:53:02

2. Good Introduction to start j2me.thanks
View Tutorial          By: Ravinder Kasarla at 2008-12-26 06:59:29

3. thanks happy to see such a site about java!
View Tutorial          By: nnnmore at 2007-03-16 06:29:20

4. Why use recursion in Java, even for Strings? The s
View Tutorial          By: Kristoffer L at 2012-11-21 01:51:36

5. Bad article ! What about the explanation of Messag
View Tutorial          By: Manish at 2011-05-24 04:44:03

6. what is the use of int getch(void)
and unge

View Tutorial          By: sania at 2014-06-04 17:15:30

7. Sir, I need to use MS Access as a database in java
View Tutorial          By: John Moses at 2012-03-31 00:20:38

8. A more complete description of the common pitfalls
View Tutorial          By: Phil at 2012-11-25 02:06:49

9. This explaination is good to understand the basic
View Tutorial          By: Nisha Thankachan.F at 2013-02-13 05:29:13

10. Hi Ramlak, Can you please let me know to resolve t
View Tutorial          By: Braj at 2009-01-29 08:50:33