I declared an array as shown below:
(我声明了一个数组,如下所示:)
int[] arr = new int[10];
Then I assigned following values to the array:
(然后我为数组分配了以下值:)
arr[0] = 1;
arr[1] = 2;
arr[2] = 3;
arr[3] = 4;
Then I declared and initialized an integer variable:
(然后我声明并初始化了一个整数变量:)
int arrayLength = arr.length;
This will be useful to find actual size but is there any method to find logical size of the array?
(这对于查找实际大小很有用,但有没有找到数组逻辑大小的方法?)
ask by Kiran Bhat translate from so 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…