Search:

Type: Posts; User: javapenguin

Search: Search took 0.10 seconds.

  1. Replies
    5
    Views
    5,007

    Re: HELP. Passing Array to class.

    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...
  2. Replies
    5
    Views
    5,007

    Re: HELP. Passing Array to class.

    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...
  3. Replies
    5
    Views
    5,007

    Re: HELP. Passing Array to class.

    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...
Results 1 to 3 of 3