Java 数组

1. 数组: 形同类型数据的集合叫做数组

2 定义数组的方式

2.1 int[] a = new int[10]; 

2.2 int a[] = new int[10]

2.3 type[] 变量名 ={new type[]} {逗号分割的初始化列表};

红色可以省略  type[] 变量名 = {逗号分割的初始化列表};

3. 对象数组

Person[] p = new Person[3];

其中Person为类

原文地址:https://www.cnblogs.com/linlf03/p/7823355.html