I am spawning 20 threads (they are all supposed to be running at the same time). However, they are all created at the same time and all start running at the same time, which gives the entire program major lag (this is lag, my computer is not slow).
So, I want to have them created at different times, e.g. generate one every 2 seconds or so. How do I do this? I have tried using a ton of stuff but none of it works the way I want it to. I have tried using boolean methods to not loop again until it is true, but this doesn't seem to work. Any ideas?
for (int i = 0; i < 20; i++) {
Rain r = new Rain();
r.start();
}