java split string of numbers into an array code example
Example 1: split string into int array
String[] strArray = input.split(",");
int[] intArray = new int[strArray.length];
for(int i = 0; i < strArray.length; i++) {
intArray[i] = Integer.parseInt(strArray[i]);
}
Example 2: split string into array java
String[] array = values.split("\\|", -1);