package com.pang.array_demo;public class Array_Demo {public static void main(String[] args) {int[] arr = {1,2,3,4,3,45};arrayDemo(arr);System.out.println("===========");arrayDemo02(arr);}// 数组正遍历public static void arrayDemo(int[] arr) {for (int i = 0; i < arr.length; i++) {System.out.println(arr[i]);}}// 数组倒遍历public static void arrayDemo02(int[] arr) {for (int i = arr.length - 1; i >= 0; i--) {System.out.println(arr[i]);}}
}