Check out example codes for "how to check if array is full java". It will help you in understanding the concepts better.

Code Example 1

int[] candy = new int[10];  //Array size is 10
     //first array: Index 0, last array index: 9. 
     for (int x=0; x < candy.length; x++)
           if (x == candy.length - 1)
                //Reached last element of array

Learn ReactJs, React Native from akashmittal.com