For this Question: You are given a NxN matrix. You need to find the <a href = "https://en.wikipedia.org/wiki/Transpose">transpose</a> of the matrix.
The matrix is of form:
a b c ...
d e f ...
g h i ...
...........
There are N elements in each row.The first line of the input contains an integer N denoting the size of the square matrix.
The next N lines contain N single-spaced integers.

<b>Constraints</b>
1 <= N <= 100
1 <=Ai <= 100000Output the transpose of the matrix in similar format as that of the input.Sample Input
2
1 3
2 2

Sample Output
1 2
3 2

Sample Input:
1 2
3 4

Sample Output:
1 3
2 4, I have written this Solution Code: import java.io.*;
import java.util.*;



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

		BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
		int n=Integer.parseInt(br.readLine());
		String arr[][]=new String[n][n];
		String transpose[][]=new String[n][n];
		int row;
		int cols;
		for(row=0;row<n;row++)
		{
			String rowNum=br.readLine();
			String rowVals[]=rowNum.split(" ");
			for(cols=0; cols<n;cols++)
			{
				arr[row][cols]=rowVals[cols];
			}
		}
		for(row=0;row<n;row++)
		{
		for(cols=0; cols<n;cols++)
			{
				transpose[row][cols]=arr[cols][row];
			    System.out.print(transpose[row][cols]+" ");
			}
		    System.out.println();
	    }

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