how to split a string array and use substring Java code example Example: split string into array java String[] array = values.split("\\|", -1);