string arraylist to char arraylist java code example
Example 1: Arraylist string to character java
String str = "abcd...";
ArrayList<Character> chars = new ArrayList<Character>();
for (char c : str.toCharArray()) {
chars.add(c);
}
Example 2: char array to arraylist java
myString.chars().mapToObj(c -> (char) c).collect(Collectors.toList());