一、传统 for(int i=0;i<array.length;i++){System.out.println(array[i]);} 二、foreach for(int a:array) System.out.println(a);