Quick question
From main thread
double[] ascore;
int i;
imax=high.highestScore(ascore[],i);
From method highestScore
public class highestScore
{
// This method checks which number is higher.
public static double highestScore(double[] score,int arraySize)
{
int index;
double maxScore=0;
for (index=0; index<arraySize; index++)
{
if (maxScore < score [index])
maxScore= score[index];
}
return maxScore;
}
}
I'm trying to pass the array and index number for array length into the method
highestScore to find the highest score and return the value. It's not working for me and I'm not sure the format I should use to pass the values through the method. Can someone show me that?