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. Is operator overloading possible in java??????
View Tutorial          By: rishi at 2008-11-01 23:55:55

2. which method is called if i call overriden method
View Tutorial          By: sarah at 2012-02-01 13:36:10

3. thanks for this example
View Tutorial          By: hai at 2011-12-16 05:36:14

4. easy to understand
View Tutorial          By: shanthi at 2011-01-02 21:25:51

5. Nice Article, but these concepts are pretty confus
View Tutorial          By: Goldest at 2011-03-18 01:50:50

6. good tutorial
View Tutorial          By: mohang at 2011-12-24 05:24:56

7. where's your main sir?
View Tutorial          By: armor at 2010-12-08 01:00:45

8. Hello, I'm using the above codes for my project. B
View Tutorial          By: Sandeep Dattaraju at 2011-02-26 11:01:48

9. an excellentttttttt siteee
View Tutorial          By: raza at 2011-04-02 10:39:46

10. MySQL Connector/J supports only TCP/IP connections
View Tutorial          By: Java Training Institute In Chennai at 2012-09-13 12:37:44