Java中的增强型for循环
增强型for循环定义如下:for(ElementType element: arrayName){};例1:int[] num = {1,2,3,4,5,6};for(int i: num){ System.out.print(i);}例2:int[] num = {1,2,3,4,5,6};for(int i = 0; i < num.length; i++){System.out.print(num[i]);}同理可有:List<In..