listing stacks and queues continued return stackarray[top--]//public char peek(/peek at top of stack return stackarray[top]//public boolean isempty(/true if stack is empty return (top =- )//public int size(/return size return top+ //public char peekn(int /return item at index return stackarray[ ]//public void displaystack(string ssystem out print( )system out print("stack (bottom-->top)")for(int = <size() ++system out printpeekn( )system out print(')system out println("")///end class stackx ///////////////////////////////////////////////////////////////class intopost /infix to postfix conversion private stackx thestackprivate string inputprivate string output ""//public intopost(string in/constructor input inint stacksize input length()thestack new stackx(stacksize)/