Hi,
In theory I understand the way Threads join() method works, but when I am
testing it with some code, I am getting unexpected results. I thought if you say:
1. start a thread1
2. start a thread2
3 do thread2.join()
I thought the result would be thread1 will pause until thread2 finishes then go back to runnable and eventually finish. Here's my code with an exlanation of results:
No matter how I change the for loop counter int in run(), Fred always finishes before Lucy. Surely he has joined the end of Lucy and must wait till she finishes.
Thanx for any help