title: How to split a string on | (pipe) in Java
body: <p>I have a string like <code>|serialNo|checkDelta?|checkFuture?|checkThis?|</code>.</p>
  
  <p>Now I am using the following code to split the string.</p>
  
  <p><code>String[] splitString = str.split("|");</code></p>
  
  <p>but when I use this I get array of string that contains each and every character, whereas I need string which contains letter like <code>serialNo</code>, <code>checkDelta?</code>, <code>checkFuture?</code>, <code>checkthis?</code>.</p>
  
  <p>How to get these? Am I missing something?</p>