title: How to use setText() function on List<String>
body: <p>I am creating the app where the players put their names into a program, the program sends their names to the next activity in a String array, and the next program puts the array into a list an then shuffles it. For some reason, everytime I try to use the.setText function, the app gets a nullpointerexception error. I have tested the list with a toast to verify that it is not null, which it is not. Any suggestions?</p>
  
  <pre><code>endInstructions = (Button)findViewById(R.id.buttonEndInstructions);
  
      player = (TextView)findViewById(R.id.textViewPlayerName);
  
      endInstructions.setOnClickListener(this);
  
      Bundle ext = getIntent().getExtras();
      int numberOfPlayers= ext.getInt("numberofplayers");
      String[] sarray = ext.getStringArray("namearray");
  
      names = Arrays.asList(sarray);
      Collections.shuffle(names);
  
      Toast.makeText(this, names.get(0), Toast.LENGTH_SHORT).show();
  
      //player.setText(names.get(0));
  </code></pre>
  
  <p>Thanks in advance!</p>