数组使用1
package com.shuzu;
public class demo04 {
public static void main(String[] args) {
int[] arrays = {1,3,4,5,66,2};
// for (int array : arrays) {
// System.out.println(array);}
printArray(arrays);
}
//打印数组元素
public static void printArray(int[] arrays){
for (int i = 0; i < arrays.length ; i++) {
System.out.print(arrays[i] + " ");
}
}
}