title: Java equivalent to Explode and Implode(PHP)
body: <p>I am new in Java although had a good experience in PHP, and looking for perfect replacement for explode and implode (available in PHP) functions in Java.</p>
  
  <p>I have Googled for the same but not satisfied with the results.
  Anyone has the good solution for my problem will be appreciated.</p>
  
  <p>For example:</p>
  
  <pre><code>String s = "x,y,z";
  //Here I need a function to divide the string into an array based on a character.
  array a = javaExplode(',', s);  //What is javaExplode?
  System.out.println(Arrays.toString(a));
  </code></pre>
  
  <p>Desired output:</p>
  
  <pre><code>[x, y, z]
  </code></pre>