标签:
代码一:
int i, j; for (i = 0, j = 0; i < 3 || j < 6; i++, j++) { System.out.println(i + j); } System.out.println("finally:"+(i+j));
执行结果:
0 2 4 6 8 10 finally:12
代码二:
int i, j; for (i = 0, j = 0; i < 3 && j < 6; i++, j++) { System.out.println(i + j); } System.out.println("finally:"+(i+j));
执行结果:
0 2 4 finally:6
标签:
原文地址:http://my.oschina.net/liuyuanyuangogo/blog/494533