Hello I've written simple program for finding anagrams and printing word + it's anagrams (if count of anagrams for it is == max count of anagrams in given file) . But I got the problem, because I don't know how to return output of filtered structure.
For printing my intent is to have something like that: word: anagram1 anagram2 anagram3... anagram(n)
Could you help me? This is my first program with usage of java.util.Stream so I feel a little lost for now.