Help with some Java arrays

Thanks. Here's my code: https://pastebin.com/Zy8imhFq

I would've also made three methods, but the assignment specifically said that we had to "create two static methods - one is for calculating class average and the other is for calculating average of math and science each."

For passing scienceAvg and mathAvg to classAverage, I tried to do " public static void ClassAverage(double[][] grades, double MathAvg, double ScienceAvg)" but the console gave an error message:

Main.java:9: error: method ClassAverage in class Main cannot be applied to given types;

    ClassAverage(grades);

    ^

required: double[][],double,double

found: double[][]

reason: actual and formal argument lists differ in length

/r/learnjava Thread Parent