doanagram(method takes the size of the word to be anagrammed as its only parameter this word is understood to be the rightmost letters of the complete word each time doanagram(calls itselfit does so with word one letter smaller than beforeas shown in figure the base case occurs when the size of the word to be anagrammed is only one letter there' no way to rearrange one letterso the method returns immediately otherwiseit anagrams all but the first letter of the word it was given and then rotates the entire word these two actions are performed timeswhere is the size of the word here' the recursive routine doanagram()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 each time the doanagram(method calls itselfthe size of the word is one letter smallerand the starting position is one cell further to the rightas shown in figure figure the recursive doanagram(method