如果你編譯並運行這段代碼
Press Enter when you have had enough
Hopalong Marilyn Slim Cassidy
Hogalong Monroe
Marilyn Cassidy
Hopalong Pickens
S
Marilyn Cassidy
Hopalong Cassidy
Hopalong Monroe
Marilyn Pickens
Slim Cassidy
Hopalong Monroe
Mari
Hopalong Cassidy
Hopalong Monroe
Marilyn Picrens
Slir cassidy
Hopalong cassidy
Hopalong Monroe
Marilyn
Enter pressed
Ending main()
如何工作
在我們的TryThread類中有三個實例變量
我們包含main()方法的類是由Thread派生的
[
From:http://tw.wingwit.com/Article/program/Java/gj/201311/27756.html