So, Im new to java and I have an assignment to enter Student Scores in a 2D array. I need to then add each students scores and compute the average.
My question is how do I add the elements in each row of the array.

Here's the code I have so far that simply prints the scores in a table

public class ComputeStuAve {
public static void main(String[] args)
{ int[][] StudentScores = {{34,78,89,92,45},{47,64,98,22,87,96},{56,89,78,67 ,88,75,45,67,89,98},
{22,66,88,98,92,34,78},{56,78,98,90,72,83,54},{78, 79,98,67,45,76,89,65}};

for (int[] row : StudentScores)
{ for (int col : row)
{ System.out.print(col + " ");
} // end of column (cell) processing

} //end of row processing