package com.nyist.array; public class Test { public static void main(String[] args) { int [] a = {2,4,5,7,5,4,3,2}; for(int i=0; i<a.length;i++) { System.out.print(a[i]+" "); } } }
String[] args的作用:把命令行参数存进数组里