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



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. This should save some time

class pa

View Tutorial          By: vamsi gude at 2012-03-20 18:27:24

2. Very good example! Thanks so much!
View Tutorial          By: Chrissy at 2010-04-14 22:37:56

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

4. thank you for this quick and easy demonstration. B
View Tutorial          By: rajesh at 2012-09-20 17:48:17

5. can anyone tell how to send sms in asp.net using p
View Tutorial          By: dubail at 2013-04-06 14:17:44

6. thanx mitra...it helped alot.
View Tutorial          By: psuyog at 2014-10-10 12:16:26

7. Its super explanation
View Tutorial          By: jose at 2011-12-08 13:36:29

8. its not working.
View Tutorial          By: raja at 2012-08-29 11:44:45

9. To RUN this code, follow below steps


View Tutorial          By: Ajay at 2010-09-04 03:01:24

10. Don't you just love people who all assume we use w
View Tutorial          By: Alan at 2012-08-01 09:10:26