listing continued //public long pop(/take item from top of stack return stackarray[top--]/access itemdecrement top //public long peek(/peek at top of stack return stackarray[top]//public boolean isempty(/true if stack is empty return (top =- )//public boolean isfull(/true if stack is full return (top =maxsize- )///end class stackx ///////////////////////////////////////////////////////////////class stackapp public static void main(string[argsstackx thestack new stackx( )/make new stack thestack push( )/push items onto stack thestack push( )thestack push( )thestack push( )while!thestack isempty(long value thestack pop()system out print(value)system out print(")/end while system out println("")/end main(/until it' empty/delete item from stack /display it