i am trying to copy the secon half of an array in to another array but it constantly keeps showing me error.It shows this, Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: Index 4 out of bounds for length 4 at Practice/practice.MergerSort.main(MergerSort.java:16) public static void main(String[] args) {
int[] a= {7,2,5,3,7,13,1,6};
            int l=a.length;
            int m=l/2;
            int L[] = new int[m];
            int[] R = new int[m];
            for(int i=m;i<a.length;i++) {
                R[i]=a[i];
                System.out.println(R[i]);
            }
            
        }
    
    }
 
     
    