public class ArrayExample { public static void main(String[] args) { int f[]=new int[4]; int j; int a[]=new int[3]; a[0]=2; a[1]=3+5; a[2]=4*8; System.out.println("a[1]="+a[1]); System.out.println("数组f:"); for(j=0;j<f.length;j++)//j=0,1,2,3 { f[j]=j; System.out.print(f[j]+" "); } } }