For this Question: You are given a 2D array of integers with m rows and n columns. You need to determine if the sum of all the elements in the array is divisible by a given integer x.The first line contains 2 integers m and n the matrix's number of rows and columns.
The following N lines contain M space- separated integers denoting the matrix.
The last line contains a single integer x.
<b>Constraints</b>
1 &le; N, M &le; 10<sup>3</sup>
1 &le; x &le; 10<sup>3</sup>Output a single integer, 1 if sum is divisible by x else 0.Input:
3 3
1 2 3
4 5 6
7 8 9
3
Output:
1
Explanation :
The sum of all elements of matrix is 45 which is divisible by 3. So, we print 1, I have written this Solution Code: import java.util.Scanner;

public class Main {

    public static void main(String[] args) {
        
        Scanner input = new Scanner(System.in);
        
        int m = input.nextInt();
        
        int n = input.nextInt();
        int[][] array = new int[m][n];
        
        
        for(int i=0; i<m; i++) {
            for(int j=0; j<n; j++) {
                array[i][j] = input.nextInt();
            }
        }
        
        
        int x = input.nextInt();
        
        int sum = 0;
        for(int i=0; i<m; i++) {
            for(int j=0; j<n; j++) {
                sum += array[i][j];
            }
        }
        
        if(sum % x == 0) {
            System.out.println(1);
        } else {
            System.out.println(0);
        }
    }
}
, In this Programming Language: Java, Now tell me if this Code is compilable or not?