Split a String into an Array Using the split Method code example Example: split string into array java String[] array = values.split("\\|", -1);