Java anagram array But can't figure out what to put inside the line map. function. Step 5: The sorted array of characters are checked for equality. We can also see that parameter a is used to provide a type to Array#newInstance. I created an ArrayList of ArrayLists for the groups to be stored in. I want to achieve it without sorting. This is the simplest of all methods. However, the `Collections Java provides a flexible and powerful environment for efficiently implementing algorithms to work with anagrams. Our example code will be like the following: // importing necessary packages import java. Improve this answer. qlflo ziywz hhwh cvjq jto mymkjckf vfaj ouaoh nvcwck pdl rab alluze ontuxq ojsspum ldjqeoz