For this Question: Given a matrix of size N*N, your task is to find the sum of the upper triangular matrix and the lower triangular matrix.

For Matrix:-
M<sub>00</sub> M<sub>01</sub> M<sub>02</sub>
M<sub>10</sub> M<sub>11</sub> M<sub>12</sub>
M<sub>20</sub> M<sub>21</sub> M<sub>22</sub>

Upper Triangular:- 
M<sub>00</sub> M<sub>01</sub> M<sub>02</sub>
_____M<sub>11</sub> M<sub>12</sub>
__________M<sub>22</sub>

Lower Triangular:- 
M<sub>00</sub>__________
M<sub>10</sub> M<sub>11</sub>_____
M<sub>20</sub> M<sub>21</sub> M<sub>22</sub>The first line of input contains a single integer N, The next N lines of input contains N space- separated integers depicting the values of the matrix.

Constraints:-
1 <= N <= 500
1 <= Matrix[][] <= 100000Print the sum of Upper and Lower Triangular Matrix separated by a space.Sample Input:-
2
1 4
2 6

Sample Output:-
11 9

Sample Input:-
3
1 4 2
1 5 7
3 8 1

Sample Output:-
20 19, 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][n];
  for(int i=0;i<n;i++){
      for(int j=0;j<n;j++){
   a[i][j]=sc.nextInt();
          
      }
      
  }
   int sum=0,sum1=0;
  for(int i=0;i<n;i++){
  for(int j=0;j<n;j++){
  if(j>=i){sum+=a[i][j];}
  if(i>=j){sum1+=a[i][j];}
  }
  }
  System.out.print(sum+" "+sum1);
}

   }
	    


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