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



Ask a Question

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. org.apache.jasper.JasperException: An exception oc
View Tutorial          By: manikanta at 2015-02-02 05:39:09

2. The program will work only need to change

View Tutorial          By: LEENA NARULA at 2012-06-15 06:45:06

3. Thanks for example..
But I have the same p

View Tutorial          By: Lina at 2009-05-02 13:23:33

4. I am trying to figure out what our Professor did w
View Tutorial          By: Abhishek at 2011-04-09 23:31:28

5. Actually i had downloaded all the files but it thr
View Tutorial          By: bornwithpowers at 2009-11-11 04:48:21

6. Hi,

i need a program to send sms wh

View Tutorial          By: Sindhuja at 2013-05-29 07:07:15

7. i want to know about basic requirement for jdbc ,
View Tutorial          By: Amit sharma at 2009-03-19 04:10:24

8. Session Bean = client data is maintained upto pred
View Tutorial          By: Chetankumar at 2012-05-19 11:12:17

9. Nice code. It is working Fine.Thnx
View Tutorial          By: Tapasya Shukla at 2010-11-12 06:32:45

10. Unable to connect with https:\\localhost:8443 but
View Tutorial          By: gopala krishna at 2012-04-02 07:17:09