28

你会这道阿里多线程面试题吗?

 5 years ago
source link: https://juejin.im/post/5c89b9515188257e5b2befdd
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
背景 在前几天,群里有个群友问了我一道面试阿里的时候遇到的多线程题目,这个题目比较有意思,在这里和大家分享一下。 废话不多说,直接上题目: 通过N个线程顺序循环打印从0至100,如给定N=3则输出: thread0: 0 thread1: 1 thread2:

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK