Java Ananagrams Solution