Answers for "how to set a CHAR"

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 "Java"

Java Answers by Framework

Browse Popular Code Answers by Language