title: Java reading text file with delimiter and pushing into an array
body: <p>I am reading a file which has a delimiter between elements. I am trying to put each element into a new index of an array. This does not seem to work properly, everything seems to end up on one index of the array. Below is a sample text file and my code. </p>
  
  <p>Textfile </p>
  
  <pre><code>%User  %James %Fields %Will Smith %sBel %James %Fields %Will Smith %sBel %James %Fields %Will Smith %sBel%James %Fields %Will Smith %sBel %James %Fields %Will Smith %sBel %James %Fields %Will Smith %sBel %James %Fields %Will Smith %sBel %James %Fields %Will Smith %sBel %James %Fields %Will Smith %sBel %James %Fields %Will Smith %sBel %James %Fields %Will Smith %sBel %James %Fields %Will Smith %sBel %James %Fields %Will Smith %sBel %James %Fields %Will Smith %sBel %James %Fields %Will Smith %sBel %James %Fields %Will Smith %sBel %James %Fields %Will Smith %sBel
  </code></pre>
  
  <p>Code</p>
  
  <pre><code>final InputStream i = getResources().openRawResource(R.raw.users);
  final Scanner s = new Scanner(i);
  try
  {
      while (s.hasNextLine())
      {
          String d = s.nextLine();
          String test;
  
          test = values[1];           
          userTextArea.append(test);
          test = "";
      }
  }
  </code></pre>