How to split words into an array in java code example
Example 1: split every character in string into array java
String s="abcd";
char[] a=s.toCharArray();
Example 2: split string into array java
String[] array = values.split("\\|", -1);
String s="abcd";
char[] a=s.toCharArray();
String[] array = values.split("\\|", -1);