增强型循环

int[] num={1,2,3,4,5,6};

for(int i:num){

sout(i);

}

原文地址:https://www.cnblogs.com/mobies/p/11717183.html