I need to develop a dictionary program so I used a trie data structure to implement it. I have created a array of object with size of 26 - so each object of class Dict will have 26 sub objects like a child.This program takes no input from user for now. I gave my input in main function. but it will print all the words in the trie.This program works fine. Is this program somewhat efficient? do I have to replace the fixed sized array of object of class Dict with any other technique?public class Dict {        boolean isWord;        Dict obj[];        Dict()        {            obj=new Dict[26]; // as there are 26 letters in english            isWord=false;        }        Dict insertWord(Dict Node,String str, int it) // used to insert a word into trie        {            if(it<str.length())            {            int Linkno=((int)(str.charAt(it)))-97; //97 is the ascii value of 'a'.            if(Node.obj[Linkno]==null)            {                Node.obj[Linkno]=new Dict();            }            insertWord(Node.obj[Linkno],str,it+1);            }            else            {                Node.isWord=true;            }            return Node;        }        void displayAll(Dict Node,String str) // used to display all the words in the trie        {            for(int i=0;i<26;i++)            {                if(Node.obj[i]!=null)                {                    if(Node.obj[i].isWord==true)                        System.out.println(str+((char)(i+97)));                    displayAll(Node.obj[i],(str+((char)(i+97))));                }            }        }        public static void main(String ar[])        {            Dict root=new Dict();            root.insertWord(root,trasaction,0);            root.insertWord(root,transformation,0);            root.insertWord(root,transmission,0);            root.insertWord(root,trance,0);            root.insertWord(root,trap,0);            root.displayAll(root,);        }    }
Trie for lowercase words
java;trie