Why am I getting a null pointer exception when assigning names to my players?
<p>I have an android activity where the user specifies the number of players in a game, and the points needed to win the game. Once the user clicks "Start", a new Game object is supposed to be created with however many Player objects. I have already validated that the numbers are being pulled from the EditText Views properly, but for some reason, I  receive a null pointer exception from my Game class at the line:</p>

<pre><code>players[i].name = "Player " + i;
</code></pre>

<p>Here's code from my Game class, there is also a Player class that has a data member name (which I didn't include). </p>

<pre><code> public class Game{
  public int i;
  public int numOfPlayers;
  public int maxScore;
  Player[] players;

      public Game(int numOfPlayers, int maxScore){
          this.maxScore = maxScore;
          this.numOfPlayers = numOfPlayers;

          players= new Player[numOfPlayers];
           for(i =0; i&lt;numOfPlayers;i++){
              players[i].name = "Player " + i;
          }
  }
 }
</code></pre>

<p>Thanks for taking the time to read this, I appreciate your help.</p>
