For this Question: Given a sorted array arr[] of n elements, check whether a given element x is present in arr[] or not.The first line contains a single integer N.
next line contains N space-separated integer arr[i]
next line contains a single integer target(k)

Constraints
1<=N<=10^5
1<=A[i]<=10^9Determine whether given number is present in array or not.Sample Input 1:
8
1 12 13 14 22 45 67 11123
14

Sample Output 1:
1
Explanation : 14 present at fourth index, I have written this Solution Code: import java.io.*;
import java.util.*;



class Main {
    public static void main (String[] args) {

                      Scanner sc = new Scanner(System.in);
                      int n = sc.nextInt();
                      int[] arr = new int[n];
                      for(int i=0; i<n; i++){
                          arr[i] = sc.nextInt();
                      }
                      int count =0;
                      int x = sc.nextInt();
                      for(int i=0; i<n; i++){
                          if(arr[i]==x){
                              System.out.print(1);
                              count++;
                          }
                      }
                      if(count==0){
                          System.out.print(0);
                      }
    }
}, In this Programming Language: Java, Now tell me if this Code is compilable or not?