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. nice code. code is running perfectly. but my probl
View Tutorial          By: Avinash at 2013-01-28 07:30:19

2. how to code for images hitting in jsp like googl
View Tutorial          By: Kumaravel at 2014-08-06 11:23:08

3. I have use the above code, Am getting the below er
View Tutorial          By: RameshKumar at 2011-07-25 05:02:12

4. hello how can i get a better java date code
View Tutorial          By: ramutomotest at 2011-12-08 17:44:49

5. Very concise, but it would be more helpful without
View Tutorial          By: Randy at 2010-11-17 14:16:01

6. Dear Friend, Please send me complete java code to
View Tutorial          By: Pawan at 2015-03-22 09:16:37

7. Plz send code of sending sms from java code...

View Tutorial          By: Shekh at 2014-11-27 14:18:25

8. today Iam getting time ,date of sending and "
View Tutorial          By: raghu at 2012-01-07 14:43:32

9. Thanks , really appreciate
View Tutorial          By: Marlen at 2010-11-23 10:50:29

10. Lots of thanks for this example
View Tutorial          By: Santosh at 2011-06-28 16:42:25