I declared an array as shown below:
int[] arr = new int[10];
Then I assigned following values to the array:
arr[0] = 1;
arr
If you want the logical size of the array, you can traverse all the values in the array and check them against zero. Increment the value if it is not zero and that would be the logical size. Because array size is fixed, you do not have any inbuilt method, may be you should have a look at collections.