listing recursion continued static int sizestatic int countstatic char[arrchar new char[ ]public static void main(string[argsthrows ioexception system out print("enter word")/get word 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 newsizeint jint position size newsizechar temp arrchar[position]/save first letter for( =position+ <sizej++/shift others left arrchar[ - arrchar[ ]arrchar[ - temp/put first on right //public static void displayword(