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. not work
View Tutorial          By: kkbb at 2011-03-12 03:52:06

2. This is probably a good java tutorial but it made
View Tutorial          By: lol at 2012-09-15 21:20:09

3. Very good. I like this way. First provide quite wr
View Tutorial          By: NJ at 2010-04-01 23:27:44

4. thx a lot
View Tutorial          By: lupita at 2013-09-04 18:58:40

5. keep it up!
View Tutorial          By: kamran at 2010-04-13 07:01:26

6. sir the program is
error: error reading C:

View Tutorial          By: Yashovardhan at 2008-05-05 21:42:27

7. hi....
can u please show me the code for fi

View Tutorial          By: pooja at 2012-07-08 16:08:08

8. Please i want to ask if this solution is really wo
View Tutorial          By: Enas Sabry at 2008-02-20 04:16:39

9. left shift output is wrong, for this results so ma
View Tutorial          By: naga sudha at 2011-04-20 04:26:40

10. good explanation with sample example makes me to u
View Tutorial          By: jagan.java at 2013-01-04 09:10:21