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. Getting coding from this is very easy to me...
View Tutorial          By: shanmugaraja at 2009-09-09 01:50:02

2. programs are making the concept easy.its a nice pr
View Tutorial          By: veeru at 2010-05-12 22:10:25

3. please gave us simple difference between structure
View Tutorial          By: vishal at 2011-12-18 13:33:17

4. Good day. I managed to get the application to work
View Tutorial          By: thabiso at 2011-06-03 09:21:32

5. realy i enjoy it for visit your site. and i unders
View Tutorial          By: vinod balot at 2015-02-09 17:43:30

6. nice to learn abt it
View Tutorial          By: aice at 2012-08-25 12:49:35

7. very nice
View Tutorial          By: prasad at 2009-11-11 05:03:16

8. regarding 'TextMessage' and 'MessageConnection' er
View Tutorial          By: gaurav at 2012-04-24 11:57:17

9. Exception in thread "Thread-0" java.lang
View Tutorial          By: yash at 2009-09-16 06:12:32

10. help me in my final project about arrays
View Tutorial          By: grace at 2013-03-13 09:54:11