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];
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];