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. If I have reliance netconnect connected to my lapt
View Tutorial          By: Shaik Allabakash at 2010-02-09 19:38:10

2. I executed this program with the help of below cod
View Tutorial          By: leela at 2011-09-08 12:16:24

3. well written hog .good going
View Tutorial          By: Rajesh at 2010-08-17 03:38:05

4. Thank You , It's Very Good.
View Tutorial          By: Jack at 2012-06-10 14:09:24

5. hi all !

This is the error im getti

View Tutorial          By: vjy at 2008-05-26 04:30:59

6. hey,m i suspend the process before start to execut
View Tutorial          By: koustubh nakate at 2010-04-01 22:16:16

7. hi..it's very nice..can you send me the version fo
View Tutorial          By: daniel81 at 2010-02-11 09:19:36

8. Thanks very much.
View Tutorial          By: Haritha at 2011-05-26 07:56:06

9. super excellent
View Tutorial          By: mani at 2013-05-27 05:32:06

10. I want to say, that you have to give complete code
View Tutorial          By: Jasvir Yadav at 2009-09-05 07:23:15