For this Question: Given an array, Arr of N integers. Find the number of non- empty subarrays such that xor of all the elements of that subarray is divisible by 8.First line of input contains a single integer N.
Second line of input contains N integers denoting the elements of Arr.

Constraints:
1 <= N <= 100000
1 <= Arr[i] <= 1000000000Print a single integer, the number of non- empty subarrays such that xor of all the elements of that subarray is divisible by 8.Sample Input
3
6 6 8

Sample Output
3

Explanation: 
(1-2) xor = 0
(1-3) xor = 8
(3-3) xor = 8, I have written this Solution Code: import java.io.*;
import java.util.*;



class Main {

	static int subCountXor(int arr[], int n)
    {
        int xorArr[] = new int[8];
        Arrays.fill(xorArr, 0);

        int cumSum = 0;
        for (int i = 0; i < n; i++) {
            cumSum ^= arr[i];
            xorArr[cumSum % 8]++;
        }
        int ans = 0;
        for (int i = 0; i < 8; i++)
            if (xorArr[i] > 1)
                ans += (xorArr[i] * (xorArr[i] - 1)) / 2;
        ans += xorArr[0];

        return ans;
    }
	public static void main (String[] args)throws IOException {
        BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
		int n=Integer.parseInt(br.readLine());
		String str=br.readLine();
		String strArr[]=str.split(" ");
		int arr[]=new int[n];
		for(int i=0;i<n;i++)
			arr[i]=Integer.parseInt(strArr[i]);

		System.out.println(subCountXor(arr,n));
	}
}, In this Programming Language: Java, Now tell me if this Code is compilable or not?