For this Question: Bob has an array of N numbers. He wants to calculate the product of the array but does not want integers greater than 10<sup>18</sup>. So, if the result exceeds 10<sup>18</sup>, print -1 instead.<b>Constraints:</b>
2 &le; N &le; 10<sup>5</sup>
0 &le; A<sub>i</sub> &le; 10<sup>18</sup>
All values in the input are integers.Print the value of A<sub>1</sub>×A<sub>2</sub>....×A<sub>N</sub> as an integer, or -1 if the value exceeds 10<sup>18</sup>.Sample Input 1 
2
1000000000 1000000000

Sample Output 1 
1000000000000000000

Sample Input 2 
3
101 9901 999999000001

Sample Output 2 
-1

<b>Explanation</b>
We have 1000000000×1000000000=1000000000000000000.
We have 101×9901×999999000001=1000000000000000001, which exceeds 10<sup>18</sup>, so we should print -1 instead., I have written this Solution Code: import java.io.*;
import java.util.*;
import java.math.BigInteger;


class Main {
    public static boolean search0 (int index,String [] arr){
        for(int i =index;i<arr.length;i++){

            if(arr[i].equals("0")){

                System.out.println(0);
                return true;
            }

        }
        return false;
    }
    public static void main (String[] args)throws IOException {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        int n = Integer.parseInt(br.readLine());
        String [] arr = br.readLine().split(" ");

        BigInteger limit = new BigInteger("1000000000000000000");
        BigInteger result = BigInteger.ONE;
        int i =0;
        for( i=0; i<n;i++){
           result = result.multiply(new BigInteger(arr[i]));

           if(result.compareTo(limit)>0){
            if(search0(i+1,arr)){
                break;
            };
            System.out.println("-1");
            break;
        }
        }

        if(i==n){
          System.out.println(result);
        }

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