For this Question: Given an integer array where every element appears an even number of times, except one element which appears an odd number of times. If the identical elements appear in pairs in the array and there cannot be more than two consecutive occurrences of an element, find the odd occurring element.The first line contains a single integer N.
The second line contains N space- separated integer A[i].

<b>Constraints</b>
1 &le; N &le; 10<sup>4</sup>
1 &le; arr[i] &le; 10<sup>3</sup>Print odd occurring element.Sample Input 1: 
5
5 5 3 4 4

Sample Output 1: 
3
 
Sample Input 2: 
5
1 1 4 4 16

Sample Output 2:
16, I have written this Solution Code: import java.io.*;
import java.util.*;



class Main {
	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().split(" ");
		int[] arr = new int[n];
		for (int i = 0; i < n; i++) {
			arr[i] = Integer.parseInt(str[i]);
		}

		int ans = 0;
		for (int i = 0; i < n; i++) {
			ans = ans^arr[i];
		}

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