For this Question: Given an array of N integers, your task is to calculate the sum of all the odd integers present in the array.First line of input contains a single integer N. The next line contains the N space separated integers.

Constraints:-
1 < = N < = 1000
1 < = Arr[i] < = 10000Print the sum of all the odd integers present in the array.Sample Input:-
4
1 2 3 4

Sample Output:-
4

Sample Input:-
2 4 6 8

Sample Output:-
0, I have written this Solution Code: 
import java.util.*;
import java.lang.*;
import java.io.*;

class Main
{
	public static void main (String[] args) throws java.lang.Exception
	{
	
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
	    int a[] = new int[n];
	    for(int i=0;i<n;i++){
	        a[i]=sc.nextInt();
	    }
	    int sum=0;
	    for(int i=0;i<n;i++){
	       if(a[i]%2==1){
	           sum+=a[i];
	       }
	    }
	    System.out.print(sum);

	}
}
, In this Programming Language: Java, Now tell me if this Code is compilable or not?