Basically this code has two threads created in two classes, and they are called from the third class. Each thread has a loop, and it sleeps after each iteration.
(co
You can't predict in which order threads will be executed unless you control their execution (with mechanism like lock, mutex, semaphore and join).
I think you need more knowledge about concurrency programming.
Here some useful links:
wikipedia's concurrency page
oracle's tutorial (IMHO it's pretty good tutorial)