title: Why am I getting an error when I try to create the Scoreboard object with an array?
body: <pre><code>import java.io.*;
  
  public class SaveAndLoad
  {
      private Scoreboard[] scoreboard = new Scoreboard[5];
      
      //constructor
      public SaveAndLoad(Scoreboard[] scoreboard)
      {
          this.scoreboard = scoreboard;
      }
      
      public static void save() throws FileNotFoundException
      {
          // 1. Create 5 GameScores
          // 2. Put 5 GameScores into a gamescore[]
          // 3. Create a Scoreboard using a gamescore[]
          
          //Create 5 instances of the Game Class
          GameScore player1 = new GameScore(&quot;Rebekah&quot;, 199);
          GameScore player2 = new GameScore(&quot;Allen&quot;, 195);
          GameScore player3 = new GameScore(&quot;Sami&quot;, 198);
          GameScore player4 = new GameScore(&quot;Megan&quot;, 142);
          GameScore player5 = new GameScore(&quot;Vince&quot;, 169);
          
          GameScore[] gamescore = new GameScore[5];
          
          gamescore[0] = player1;
          gamescore[1] = player2;
          gamescore[2] = player3;
          gamescore[3] = player4;
          gamescore[4] = player5;
  
          //Create an instance of the Scoreboard Class using the GameScore array
          Scoreboard scoreboard = new Scoreboard(GameScore[] gamescore);
  </code></pre>
  <p>The last line in this is giving me an error and I'm not sure why because those are the parameters for the Scoreboard class.</p>