Split a string and convert it to an array code example Example: split string into array java String[] array = values.split("\\|", -1);