For this Question: Mohit has an array of N integers containing all elements from 1 to N, somehow he lost one element from the array.
Given N-1 elements your task is to find the missing one.The first line of input contains a single integer N, the next line contains N-1 space-separated integers.

<b>Constraints:-</b>
1 &le; N &le; 1000
1 &le; elements &le; NPrint the missing elementSample Input:-
3
3 1

Sample Output:
2

Sample Input:-
5
1 4 5 2

Sample Output:-
3, 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-1];
	    for(int i=0;i<n-1;i++){
	        a[i]=sc.nextInt();
	    }
	    boolean present = false;
	    for(int i=1;i<=n;i++){
	        present=false;
	        for(int j=0;j<n-1;j++){
	            if(a[j]==i){present=true;}
	        }
	        if(present==false){
	            System.out.print(i);
	            return;
	        }
	    }

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