📜  java代码示例中的字符集

📅  最后修改于: 2022-03-11 14:52:16.203000             🧑  作者: Mango

代码示例1
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