class Demo3 { public static void main(String[] args) { //数组的初始化 int[] a = new int[] {12,13,14,15}; int[] b = {12,13,14,15}; //数组的便利 for(int i = 0;i<4;i++) { System.out.println(a[i]); } for(int i = 0;i<b.length;i++) { System.out.println(b[i]); } } }
class Demo3 { public static void main(String[] args) { //数组的初始化 int[] a = new int[] {12,13,14,15}; int[] b = {12,13,14,15}; //数组的便利 for(int i = 0;i<4;i++) { System.out.println(a[i]); } for(int i = 0;i<b.length;i++) { System.out.println(b[i]); } } }