不一样的for写法-体验J2SE 1.5新特性之增强For循环
第一种for循环 对于遍历数组,这个循环一般是采取这样的写法: 清单1:遍历数组的传统方式 Java代码/* 建立一个数组 */ int[] integers = {1, 2, 3, 4}; /* 开始遍历 */ for (int j = 0; j < integers.length; j++) { int i = integers[j]; Syst...
原创
2008-09-05 09:26:47 ·
145 阅读 ·
0 评论