title: Java String split removed empty values
body: <p>I am trying to split the Value using a separator.
  But I am finding the surprising results</p>
  
  <pre><code>String data = "5|6|7||8|9||";
  String[] split = data.split("\\|");
  System.out.println(split.length);
  </code></pre>
  
  <p>I am expecting to get 8 values. <strong>[5,6,7,EMPTY,8,9,EMPTY,EMPTY]</strong>
  But I am getting only 6 values.</p>
  
  <p>Any idea and how to fix. No matter EMPTY value comes at anyplace, it should be in array.</p>