package cn.edu.bjut.chapter5; public class Array1DTester { public static void main(String[] args) { int a[] = new int[5]; for (int i = 0; i < a.length; i++) { a[i] = i; } for (int i = a.length - 1; i >= 0; i--) { System.out.println("a[" + i + "] = " + a[i]); } int[] b = new int[] { 4, 6, 8, 32 }; for (int i = 0; i < b.length; i++) { System.out.println("b[" + i + "] = " + b[i]); } } }