Sum of the two dimentional array in Java
<p>This is a homework question and im still a newbie to java.
Write a code segment that computes the sum of all the values in marks.</p>

<p>This is my answer and it has compilation errors. Please help</p>

<pre><code>class myArray{

    public static void main(String args []){

        int [] [] marks = {{1,2,3,4,5}, {6,7,8,9}, {10,11,12}};
        for(int i = 0; i&lt;marks.length; i++){
            int sum = 0;
            for(int j = 0; j &lt;marks[i].length; j++) {
                sum = sum + makrs[j][i];
            }
        }
        System.out.println(sum);

    }
}
</code></pre>
