因簡書改版后無法添加擴展鏈接,20170307問題解析請到公眾號查看,問題解析在公眾號首發,公眾號ID:weknow619。
package Mar2017;
public class Ques0308 implements Runnable{
private String str1 = "this ";
private int[] str2 = {1,2,3,4,5};
public static void main(String[] args) {
Ques0308 test = new Ques0308();
(new Thread(test)).start();
(new Thread(test)).start();
}
@Override
public synchronized void run() {
for(int i = 0; i < 5; i++) {
System.out.println(str1 + str2[i]);
}
}
}
今日問題:
請問主程序運行結果是什么?