Is it possible to create n variables within a loop. Something like
for(int x = 0; int x < noOfThreads){
//create new threads here
}
I need to create the number of threads specified as an runtime argument. Not too sure how to go about this.
Thanks
You can just create and start the threads in the loop.
If you need to keep references to the
Threadobjects, then put them in a collection such asArrayList: