What about that error message don't you understand? I realize they can be a bit cryptic (sometimes), especially if you haven't taken the time to READ them and apply them to your code and the error about which they complain. Let's break it down:
Omg2.java:31: error: method max in class Omg2 cannot be applied to given types;
int maxValue = max(a);
"31: method max cannot be applied to give types" - that means at line 31 the method max has been called with incorrect parameters.
The next line points to the offending statement (The caret, '^', actually points to the occurrence of the error if the formatting is preserved.)
"required: double[],int,int
found: double[][]"
The first line indicates the parameters required by the method max().
The second line indicates the parameter(s) found in the offending call. Since the
parameter(s) found don't match the
parameters required, there's an error.
Solution: Modify the code, either the method signature or the method call, so that the parameters match.