matrix addition java
<p>I wrote this matrix addition program and I dont know why but I keep getting this two errors on lines 61 and 63 and i dont want to handle the exceptions but just throwing would do</p>

<pre><code>error: unreported exception IOException; must be caught or declared
</code></pre>

<p>The code of the program is as follows:</p>

<pre><code>import java.io.*;
class Arr
{
    int r,c;
    int arr[][];

    Arr(int r,int c)
    {
        this.r=r;
        this.c=c;
        arr=new int[r][c];
    }

    int[][] getMatrix()throws IOException
    {
        BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
        for(int i=0;i&lt;r;i++)
        {
            for(int j=0;j&lt;c;j++)
            {
                System.out.println("enter element");
                arr[i][j]=Integer.parseInt(br.readLine());
            }
        }
        return arr;
    }

    int[][] findsum(int a[][],int b[][])
    {
        int temp[][]=new int[r][c];
        for(int i=0;i&lt;r;i++)
            for(int j=0;j&lt;c;j++)
                temp[i][j]=a[i][j]+b[i][j];
        return temp;
    }

    void putmatrix(int res[][])
    {
        for(int i=0;i&lt;r;i++)
        {
            for(int j=0;j&lt;c;j++)
            {
                System.out.println(res[i][j]+"\t");
            }
        }
        System.out.println();
    }

}


class Matrixsum
{
    public static void main(String args[])
    {
        Arr obj1=new Arr(3,3);
        Arr obj2=new Arr(3,3);

        int x[][],y[][],z[][];
        System.out.println("\nEnter matrix 1");
        x=obj1.getMatrix();
        System.out.println("Enter matrix 2");
        y=obj2.getMatrix();
        z=obj1.findsum(x,y);
        System.out.println("the sum matrix is");
        obj2.putmatrix(z);
    }
}
</code></pre>
