split string into array jaba code example
Example 1: split string into array java
String[] array = values.split("\\|", -1);
Example 2: split string by index java
String s ="123456789abcdefgh";
String sub = s.substring(0, 10);
String remainder = s.substring(10);