Java 8 Stream unique characters from array
问题 Trying to write a simple program that will print the unique words from an input array in Java8 . For example if the input is String[] input = {"This", "is", "This", "not"}; The program should output [T, h, i, s, n, o, t] , the order of elements should follow the same pattern as they appear in input. My approach is to split the input , then map , distinct and finally collect it toList. But the following code is printing list of streams instead of words, what am i missing?.E.g. String[] input =