listing shows the complete anagram java program the main(routine gets word from the userinserts it into character array so it can be dealt with convenientlyand then calls doanagram(listing the anagram java program /anagram java /creates anagrams /to run this programc>java anagramapp import java io */for / ///////////////////////////////////////////////////////////////class anagramapp static int sizestatic int countstatic char[arrchar new char[ ]public static void main(string[argsthrows ioexception system out print("enter word")/get word system out flush()string input getstring()size input length()/find its size count for(int = <sizej++/put it in array arrchar[jinput charat( )doanagram(size)/anagram it /end main(/public static void doanagram(int newsizeif(newsize = /if too smallreturn/go no further for(int = <newsizej++/for each positiondoanagram(newsize- )/anagram remaining if(newsize== /if innermostdisplayword()/display it rotate(newsize)/rotate word ///rotate left all chars from position to end public static void rotate(int newsize