I declared an array as shown below:
int[] arr = new int[10];
Then I assigned following values to the array:
arr[0] = 1;
arr
To find length of an array A you should use the length property. It is as A.length, do not use A.length() its mainly used for size of string related objects.
The length property will always show the total allocated space to the array during initialization.
If you ever have any of these kind of problems the simple way is to run it. Happy Programming!