This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
am i implementing this code right? my output doesnt take effect of join() usage at all. "Lucy" would come out before Fred does!
join() causes the calling thread to wait until the completion of the thread represented by the Thread object. In your example, it will cause the main thread (the thread executing the main method) to wait for the completion of thread two. Thread one runs independently of the other two threads (main and two).