Q:

Why this for loop of array uses newARRAY.length-1?

Hello I'm beginner at java now I've arrived to arrays here is a for loop to sort number from highest to lowest, my question is why the instructor used 

newARRAY.length-1

?
public static int [] integers;

public static int [] sortArray(int[] array){
    boolean PeaceArray = true;
    int temp;
    int [] newARRAY = Arrays.copyOf(array,array.length);
    while(PeaceArray){
        PeaceArray = false;
        for(int i=0;i<newARRAY.length-1;i++){
            if(newARRAY[i]< newARRAY[i+1]){
                temp = newARRAY[i];
                newARRAY[i] = newARRAY[i+1];
                newARRAY[i+1] = temp;
                PeaceArray = true;

            }

        }

    }

    return newARRAY;
}

A:

Array start the index with 0
ex:
int a[]={1,2,3,4,5};
then a.length=5 but a[5] does't exits in the array
a[0]=1
a[1]=2
a[2]=3
a[3]=4
a[4]=5
for this reason we use a.length-1 instead of a.length

