Answers for "how to get the set of an char value in java"

1

set of char in java

myString.chars().mapToObj(i -> (char) i).collect(Collectors.toList());
myString
    .chars() // Convert to an IntStream
    .mapToObj(i -> (char) i) // Convert int to char, which gets boxed to Character
    .collect(Collectors.toList()); // Collect in a List<Character>
Posted by: Guest on August-27-2021

Code answers related to "how to get the set of an char value in java"

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language