title: Splitting array on new line
body: <p>I am submitting the following input through stdin:</p>
  
  <p>4 2</p>
  
  <p>30 one</p>
  
  <p>30 two</p>
  
  <p>15 three</p>
  
  <p>25 four</p>
  
  <p>My code is:</p>
  
  <pre><code>public static void main(String[] args) throws IOException {
  
          BufferedReader stdin = new BufferedReader(new InputStreamReader(System.in));
          String submittedString;
          System.out.flush();
          submittedString = stdin.readLine();
  
          zipfpuzzle mySolver = new zipfpuzzle();
          mySolver.getTopSongs(submittedString);
  
      }
  </code></pre>
  
  <p>Which calls:</p>
  
  <pre><code>//Bringing it all together
      public String getTopSongs(String myString) {
  
          setUp(myString);
          calculateQuality();
          qualitySort();
          return titleSort();
  
      }
  </code></pre>
  
  <p>Which calls</p>
  
  <pre><code>public void setUp(String myString) {
  
      String tempString = myString;
  
      //Creating array where each element is a line
      String[] lineExplode = tempString.split("\\n+");
  
      //Setting up numSongsAlbum and songsToSelect
      String[] firstLine = lineExplode[0].split(" ");
      numSongsAlbum = Integer.parseInt(firstLine[0]);
      songsToSelect = Integer.parseInt(firstLine[1]);
  
      System.out.println(lineExplode.length);
  //etc
  }
  </code></pre>
  
  <p>However, for some reason lineExplode.length returns value 1... Any suggestions?</p>
  
  <p>Kind Regards,
  Dario</p>