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. i want divide the jsf page to two pages
pl

View Tutorial          By: habib_fci at 2008-06-11 06:05:29

2. i want my program to allow more than one trainee&a
View Tutorial          By: carl at 2011-01-30 22:21:21

3. Please provide some more examples ...It will be ve
View Tutorial          By: it interview questions at 2012-09-29 05:07:55

4. The site is too informative. I just like their imm
View Tutorial          By: Priyadarshi Tripathi at 2010-10-26 23:44:46

5. Hi,

Your COM port is currently in u

View Tutorial          By: Ramlak at 2008-04-14 07:29:55

6. sir every time we are using this.wedth(for example
View Tutorial          By: praveen kumar at 2011-06-28 01:33:44

7. Finally a tutorial that clearly explains why Hasht
View Tutorial          By: Lisa Ander at 2011-10-27 20:33:15

8. very nice for javascript beginers..
View Tutorial          By: Nilesh at 2012-08-29 10:19:13

9. Hi all, i have tried above code, but am getting fo
View Tutorial          By: swathi at 2010-06-24 05:18:28

10. very easy and simple program..
need minor

View Tutorial          By: Metal at 2014-05-07 10:31:04