public class Anagram{ /** * a recursive method to generate word * anagrams using one buffer only * NOTE: there is actually no method that checks that * the word is a valid english word * for a complete implementation you will need such a method * @param len the length of the word * @param curr_size the current position to populate * @param buffer the word so far is in 0-curr_size * the rest of the positions are filled with letters to be used */ public static void anagram(int len,int curr_size, char[] buffer){ if (len==curr_size){ //if isValidWord(buffer) System.out.println(buffer); } else{ char temp=buffer[curr_size]; for (int i=curr_size;i