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. I want java
View Tutorial          By: A.S.Vtihyatharan at 2009-12-01 03:25:36

2. what if i use multiple switch statement, is it wor
View Tutorial          By: earl at 2012-01-29 04:10:25

3. works for me - thanks !!!!!
View Tutorial          By: Vaneeza at 2011-12-19 17:06:09

4. This article is clearly showing the beauty of the
View Tutorial          By: ashok at 2012-02-25 12:51:01

5. man i really havnt got your last example. how it g
View Tutorial          By: rakesh at 2013-02-21 08:20:29

6. Very cool one, thanks, got the concept clear
View Tutorial          By: black boot at 2010-04-18 08:20:20

7. Good
View Tutorial          By: sandesh at 2009-10-01 01:15:29

8. I have loaded allthe 5 java files.But how to imple
View Tutorial          By: devi at 2008-04-01 01:02:28

9. hi,
i am download 5 files and instantiate

View Tutorial          By: ganesh kumar at 2008-09-23 05:27:16

10. very nice example
View Tutorial          By: lois at 2010-10-05 23:05:01