Comment on Tutorial - ThreadGroup Sample in Java By Mashoud



Comment Added by : pavan kurariya

Comment Added at : 2010-01-14 00:35:55

Comment on Tutorial : ThreadGroup Sample in Java By Mashoud
WHY You are using such huge code for suspending and resuming
.....appart from that we can just use
booean threadActivatedFlag = false;
while(){
initialize all thread..........
start the thread..
add in group...
}
........................
while(threadActivatedFlag )
{
if(threadGroup.activeCount()==0)
threadActivatedFlag = false;
else
Thread.sleep(4000);
}


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. it should be:
/* --------------- */

View Tutorial          By: Ryba at 2010-05-19 15:45:48

2. give some good examples very bad i dont lke dis ex
View Tutorial          By: abinaya banu at 2014-07-14 06:04:28

3. can any body help me how to execute this code ....
View Tutorial          By: nikhil at 2009-06-04 23:10:30

4. Hi divya, You will have to edit the SerialParamete
View Tutorial          By: Ramlak at 2008-04-27 05:54:47

5. Thanks :) It works for me :)
View Tutorial          By: Milind at 2011-12-07 10:05:23

6. when i was running this code... it is giving me th
View Tutorial          By: Nilesh Agrawal at 2012-06-08 15:08:25

7. hi i am new to JSP wht is class.forname in the cod
View Tutorial          By: chanti at 2011-05-07 03:02:26

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

9. sir will you please tell me how i get out of all t
View Tutorial          By: mitali at 2012-05-06 09:54:49

10. Error loading SolarisSerial: java.lang.Unsatisfied
View Tutorial          By: koteshwar at 2011-02-05 05:33:19