title: Parsing Pipe separated Strings
body: <p>I am using the following code to parse a string:package org.datacontract;</p>
  
  <pre><code>public class TestParsing {
  
  
      public static void main(String[] args){
          String test = "6000FCI|6|22|122548";
  
          String[] result = test.split("\\|");
  
          for(String s : result){
              System.out.println(s);
          }
      }
  }
  </code></pre>
  
  <p><em>My output is:</em> </p>
  
  <pre><code>6000FCI
  6
  22
  122548
  </code></pre>
  
  <p>How do I get the first value only where my output be : 
  6000FCI</p>