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. this code should be commented I mean a lot of comm
View Tutorial          By: mmmm at 2012-03-31 00:44:41

2. very easy to understand ... a quite a good example
View Tutorial          By: Dinesh at 2012-09-22 18:19:45

3. Very good description. I was quite confused before
View Tutorial          By: Donna at 2011-07-31 03:46:05

4. its nice explanation.
View Tutorial          By: rahul ahuja at 2010-06-13 22:33:35

5. i want to know java coding
View Tutorial          By: carmela azarce at 2012-08-08 02:47:13

6. i am a bca student. i want to know more about garb
View Tutorial          By: ahana at 2011-06-26 11:02:36

7. wow! thats nice, java program can read and write t
View Tutorial          By: Mutare at 2011-02-25 22:58:09

8. i am trying to run the above example in eclipse bu
View Tutorial          By: Prathyusha at 2015-03-10 11:01:06

9. hey hiii.
at last the progrma has be runnin

View Tutorial          By: jugal at 2009-02-20 08:22:31

10. very excellent1!!!!!!!!!!!!!!!!!!!!!!!!!!!
View Tutorial          By: santosh manchala at 2010-10-10 13:07:07