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



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 is very simple and understandable tutorial, the
View Tutorial          By: Syed Turab at 2010-03-09 07:27:15

2. the above code works fine for. May someone help wi
View Tutorial          By: T.T at 2012-02-23 06:22:36

3. @Adam:
CompareTo returns the difference of

View Tutorial          By: Azher at 2010-01-29 12:23:39

4. It is working. Thank u dear!!!
View Tutorial          By: Ashwani Rana at 2009-04-02 03:56:17

5. How can i update status 1 and 0 in RMS ?
an

View Tutorial          By: maaz at 2011-06-16 02:54:28

6. Having this error while using comm.jsr for sending
View Tutorial          By: Amit Kumar at 2013-10-15 09:04:58

7. All in all is not a comment.bt a question How 2 us
View Tutorial          By: Tkalani at 2009-06-03 02:16:14

8. the reason for this is quite simple: java expands
View Tutorial          By: vineeth at 2011-08-25 13:54:37

9. hi
View Tutorial          By: raj at 2010-02-12 02:48:09

10. Hi ,
please i need j2me appliacation :

View Tutorial          By: youyou92 at 2014-12-01 18:20:52