Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

threads array java

int argsize = 10;
Thread myThreads[] = new Thread[argsize];
for (int j = 0; j < argSize; j++) {
    myThreads[j] = new Thread();
    myThreads[j].start();
}
for (int j = 0; j < argSize; j++) {
    myThreads[j].join(); //todo add catch exception
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #threads #array #java
ADD COMMENT
Topic
Name
9+2 =