public class Demo04 {
public static void main(String[] args) {
//定义数组
int[] arr = {1,2,3,4,5};
System.out.println(arr[0]);
System.out.println(arr[1]);
System.out.println(arr[2]);
System.out.println(arr[3]);
System.out.println(arr[4]);
//数组遍历
for(int i=0;i<=arr.length;i++){
System.out.println(i);
}
for (int i = 0; i < arr.length; i++) {
}
}
}