anagram.java: added Java example