1.数组的定义
1)int[] age;
2)int age[];

数组必须初始化后才能使用,初始化表示在内存中分配空间。
2.数组初始化

示例:
int[] ages = new int[] {1,2,3,4};


1)int[] age;
2)int age[];
数组必须初始化后才能使用,初始化表示在内存中分配空间。
示例:
int[] ages = new int[] {1,2,3,4};
本文标题:数组
本文链接:https://www.haomeiwen.com/subject/yhiskftx.html
网友评论