WAP to add two matrices using BufferedReader in java

import java.io.*;
class AddMatrices
{
public static void main(String args[])
{
int i,j;
int Mat1[][]=new int[3][3];
int Mat2[][]=new int[3][3];
int Mat3[][]=new int[3][3];
BufferedReader bf=new BufferedReader(new InputStreamReader(System.in));
System.out.println("enter the elements of matrix1");
try
{ for(i=0;i<3;i++)
{
for(j=0;j<3;j++)
{
Mat1[i][j] =Integer.parseInt(bf.readLine());
}
}
System.out.println("enter the elements of matrix2");
for(i=0;i<3;i++)
{
for(j=0;j<3;j++)
{
Mat2[i][j] =Integer.parseInt(bf.readLine());
}
}
}
catch(Exception e)
{
e.printStackTrace();
}
        for(i=0;i<3;i++)
{
for(j=0;j<3;j++)
{
Mat3[i][j] =Mat1[i][j]+Mat2[i][j];
}
}
System.out.println("elements of both matrices are added succesfully");
for(i=0;i<3;i++)
{
for(j=0;j<3;j++)
{
System.out.print(Mat3[i][j]);
}
        System.out.println();
}
}
}

Comments