package com.ant.jdk8.chap05; import java.util.Arrays; import java.util.List; public class StreamMapDemo { public static void main(String[] args) { List<String> words = Arrays.asList("Hello","World"); words.stream() .map(word->word.split("")) .flatMap(Arrays::stream) .distinct().forEach(System.out::print); } }