title: Possible error in String's split method
body: <p>I have de next code:</p>
  
  <pre><code>String test = "A,B,,,,,";
  
  String[] result = test.split(",");
  
  for(String s : result){
      System.out.println("$"+s+"$");
  }
  </code></pre>
  
  <p>The output is:</p>
  
  <p>$A$<br/>
  $B$</p>
  
  <p>and y I expected:</p>
  
  <p>$A$<br/>
  $B$<br/>
  $$<br/>
  $$<br/>
  $$<br/>
  $$<br/>
  $$</p>
  
  <p>but, I modified the code as follows:</p>
  
  <pre><code>String test = "A,B,,,,,C";
  
  String[] result = test.split(",");
  
  for(String s : result){
      System.out.println("$"+s+"$");
  }
  </code></pre>
  
  <p>and the result is:</p>
  
  <p>$A$<br/>
  $B$<br/>
  $$<br/>
  $$<br/>
  $$<br/>
  $$<br/>
  $C$<br/></p>
  
  <p>other variation:</p>
  
  <pre><code>String test = "A,B,,,C,,";
  
  String[] result = test.split(",");
  
  for(String s : result){
      System.out.println("$"+s+"$");
  }
  </code></pre>
  
  <p>the result:</p>
  
  <p>$A$<br/>
  $B$<br/>
  $$<br/>
  $$<br/>
  $C$<br/></p>
  
  <p>any idea?</p>
  
  <p>I need this for convert csv file to java objects, but when they don't send me the last column the code not work correctly</p>