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.
I have Googled for the same but not satisfied with the results. Anyone has the good solution for my problem will be appreciated.
For example:
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));
Desired output:
[x, y, z]