title: Assign value to an array object in Java
body: <p>I am attempting to assign a value to an array object like this:</p>
  
  <pre><code>public class Players {
      String Name;
  }
  
  Players[] player = new Players[10];
  String name = Mike;
  player[1].Name = name;
  </code></pre>
  
  <p>I am getting a NullPointerException and am not sure why. What could be causing this?</p>