And you pass them the arrays you made in your main method, not the variable names from your other class.
Also, to pass an array, all you need to call that method is the array variable name you're...
Type: Posts; User: javapenguin
And you pass them the arrays you made in your main method, not the variable names from your other class.
Also, to pass an array, all you need to call that method is the array variable name you're...
Scores bs = new Scores(double[] badScores); // PROBLEM HERE.HOW DO I PASS ARRAY??
Scores gs = new Scores(double[] goodScores); // HERE ALSO.
first of all, you need both arrays since you passed...
public void Scores(double[] bad, double[] good) // HOW TO I ACCESS ARRAY FROM MAIN???
{
badScores = bad;
goodScores = good;
}
get rid of the void and you now have a constructor of class...