video game in figure figure an illustration of an array of ten (inthigh scores for video game such an organization is quite usefulfor it allows us to do some interesting computations for examplethe following method adds up all the numbers in an array of integers/*adds all the numbers in an integer array *public static int sum(int[aint total for (int = lengthi==/note the use of the length variable total + [ ]return totalthis example takes advantage of nice feature of javawhich allows us to find the number of cells an array storesthat isits length in javaan array is special kind of object and the length of is stored in an instance variablelength that iswe never need to guess the length of an array in javathe length of an array can be accessed as followsarray_name length where array_name is the name of the array thusthe cells of an array are numbered , and so onup to length array elements and capacities each object stored in an array is called an element of that array element number is [ ]element number is [ ]element number is [ ]and so on since the length of an array determines the maximum number of things that can be stored in