因简书改版后无法添加扩展链接,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]);
}
}
}
今日问题:
请问主程序运行结果是什么?